@@ -59,8 +59,8 @@ class OsSpecificFrontendSpec extends AnyFlatSpec with Matchers {
5959 frontend : PluginFrontend
6060 ): frontend.InternalState = {
6161 val random = new Random ()
62- val toSend = Array .fill(123 )(random.nextInt(256 ).toByte)
63- val toReceive = Array .fill(456 )(random.nextInt(256 ).toByte)
62+ val toSend = Array .fill(100000 )(random.nextInt(256 ).toByte)
63+ val toReceive = Array .fill(100000 )(random.nextInt(256 ).toByte)
6464 val env = new ExtraEnv (secondaryOutputDir = " tmp" )
6565
6666 val fakeGenerator = new ProtocCodeGenerator {
@@ -75,24 +75,18 @@ class OsSpecificFrontendSpec extends AnyFlatSpec with Matchers {
7575 if (i % 100 == 1 ) println(s " Running iteration $i of $repeatCount" )
7676 val (state, response) =
7777 testPluginFrontend(frontend, fakeGenerator, env, toSend)
78- try {
79- response mustBe toReceive
80- } catch {
81- case e : TestFailedException =>
82- System .err.println(
83- s """ Failed on iteration $i of $repeatCount: ${e.getMessage}"""
84- )
78+ if (! (response sameElements toReceive)) {
79+ System .err.println(
80+ s " Failed on iteration $i of $repeatCount ( $state): ${response.length} != ${toReceive.length}"
81+ )
8582 }
8683 }
8784 val (state, response) =
8885 testPluginFrontend(frontend, fakeGenerator, env, toSend)
89- try {
90- response mustBe toReceive
91- } catch {
92- case e : TestFailedException =>
93- System .err.println(
94- s """ Failed on iteration $repeatCount of $repeatCount: ${e.getMessage}"""
95- )
86+ if (! (response sameElements toReceive)) {
87+ System .err.println(
88+ s " Failed on iteration $repeatCount of $repeatCount ( $state): ${response.length} != ${toReceive.length}"
89+ )
9690 }
9791 state
9892 }
0 commit comments