@@ -59,8 +59,8 @@ class OsSpecificFrontendSpec extends AnyFlatSpec with Matchers {
59
59
frontend : PluginFrontend
60
60
): frontend.InternalState = {
61
61
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)
64
64
val env = new ExtraEnv (secondaryOutputDir = " tmp" )
65
65
66
66
val fakeGenerator = new ProtocCodeGenerator {
@@ -75,24 +75,18 @@ class OsSpecificFrontendSpec extends AnyFlatSpec with Matchers {
75
75
if (i % 100 == 1 ) println(s " Running iteration $i of $repeatCount" )
76
76
val (state, response) =
77
77
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
+ )
85
82
}
86
83
}
87
84
val (state, response) =
88
85
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
+ )
96
90
}
97
91
state
98
92
}
0 commit comments