Skip to content

Commit

Permalink
Change to 100KB messages
Browse files Browse the repository at this point in the history
  • Loading branch information
bell-db committed Sep 22, 2024
1 parent ee9e233 commit 32d3e84
Showing 1 changed file with 10 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ class OsSpecificFrontendSpec extends AnyFlatSpec with Matchers {
frontend: PluginFrontend
): frontend.InternalState = {
val random = new Random()
val toSend = Array.fill(123)(random.nextInt(256).toByte)
val toReceive = Array.fill(456)(random.nextInt(256).toByte)
val toSend = Array.fill(100000)(random.nextInt(256).toByte)
val toReceive = Array.fill(100000)(random.nextInt(256).toByte)
val env = new ExtraEnv(secondaryOutputDir = "tmp")

val fakeGenerator = new ProtocCodeGenerator {
Expand All @@ -75,24 +75,18 @@ class OsSpecificFrontendSpec extends AnyFlatSpec with Matchers {
if (i % 100 == 1) println(s"Running iteration $i of $repeatCount")
val (state, response) =
testPluginFrontend(frontend, fakeGenerator, env, toSend)
try {
response mustBe toReceive
} catch {
case e: TestFailedException =>
System.err.println(
s"""Failed on iteration $i of $repeatCount: ${e.getMessage}"""
)
if (!(response sameElements toReceive)) {
System.err.println(
s"Failed on iteration $i of $repeatCount ($state): ${response.length} != ${toReceive.length}"
)
}
}
val (state, response) =
testPluginFrontend(frontend, fakeGenerator, env, toSend)
try {
response mustBe toReceive
} catch {
case e: TestFailedException =>
System.err.println(
s"""Failed on iteration $repeatCount of $repeatCount: ${e.getMessage}"""
)
if (!(response sameElements toReceive)) {
System.err.println(
s"Failed on iteration $repeatCount of $repeatCount ($state): ${response.length} != ${toReceive.length}"
)
}
state
}
Expand Down

0 comments on commit 32d3e84

Please sign in to comment.