@@ -30,6 +30,8 @@ abstract class UDPPeerGroupSpec[PG <: UDPPeerGroupSpec.TestGroup[_]](name: Strin
30
30
import UDPPeerGroupSpec .TestGroup
31
31
import scala .language .reflectiveCalls
32
32
33
+ val testTimeout = 15 .seconds
34
+
33
35
implicit val scheduler = Scheduler .fixedPool(" test" , 16 )
34
36
35
37
implicit val pc : PatienceConfig = PatienceConfig (5 seconds)
@@ -57,7 +59,7 @@ abstract class UDPPeerGroupSpec[PG <: UDPPeerGroupSpec.TestGroup[_]](name: Strin
57
59
case (pg1, pg2) =>
58
60
testCode(pg1, pg2).void
59
61
}
60
- .runSyncUnsafe(15 .seconds )
62
+ .runSyncUnsafe(testTimeout )
61
63
}
62
64
63
65
def withARandomUDPPeerGroup [M ](
@@ -67,7 +69,7 @@ abstract class UDPPeerGroupSpec[PG <: UDPPeerGroupSpec.TestGroup[_]](name: Strin
67
69
.use { pg =>
68
70
testCode(pg).void
69
71
}
70
- .runSyncUnsafe(15 .seconds )
72
+ .runSyncUnsafe(testTimeout )
71
73
}
72
74
73
75
it should " report an error for sending a message greater than the MTU" in
@@ -91,7 +93,7 @@ abstract class UDPPeerGroupSpec[PG <: UDPPeerGroupSpec.TestGroup[_]](name: Strin
91
93
}
92
94
93
95
it should " send and receive a message" in withTwoRandomUDPPeerGroups[String ] { (alice, bob) =>
94
- StandardTestPack .messagingTest(alice, bob).recover {
96
+ StandardTestPack .messagingTest(alice, bob).timeout(testTimeout - 1 .second). recover {
95
97
case _ : TimeoutException if sys.env.get(" CI" ).contains(" true" ) =>
96
98
cancel(" ETCM-345: Intermittent timeout on Circle CI." )
97
99
}
0 commit comments