diff --git a/akka-remote/src/test/scala/akka/remote/transport/AkkaProtocolStressTest.scala b/akka-remote/src/test/scala/akka/remote/transport/AkkaProtocolStressTest.scala index 8c26b62c30..ce226b190b 100644 --- a/akka-remote/src/test/scala/akka/remote/transport/AkkaProtocolStressTest.scala +++ b/akka-remote/src/test/scala/akka/remote/transport/AkkaProtocolStressTest.scala @@ -68,7 +68,11 @@ object AkkaProtocolStressTest { class AkkaProtocolStressTest extends AkkaSpec(configA) with ImplicitSender with DefaultTimeout { - val systemB = ActorSystem("systemB", system.settings.config) + val systemB = ActorSystem( + "systemB", + // Retry limit for system B should be high enough that it does not trigger during this test. Otherwise + // too much messages can be dropped causing the test to fail sporadically. + ConfigFactory.parseString("akka.remote.maximum-retries-in-window = 20").withFallback(system.settings.config)) val remote = systemB.actorOf(Props(new Actor { def receive = { case seq: Int ⇒ sender ! seq