From ad5d6f5cd4a8d21ad62044e4ddbd6efd2226a8b4 Mon Sep 17 00:00:00 2001 From: Andrius Dagys Date: Thu, 1 Dec 2016 13:21:25 +0000 Subject: [PATCH] DistributedImmutableMapTest: enable copycat client connection retry to avoid race conditions --- .../net/corda/node/services/DistributedImmutableMapTests.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/node/src/test/kotlin/net/corda/node/services/DistributedImmutableMapTests.kt b/node/src/test/kotlin/net/corda/node/services/DistributedImmutableMapTests.kt index 112b6e4939..cd6c4fb483 100644 --- a/node/src/test/kotlin/net/corda/node/services/DistributedImmutableMapTests.kt +++ b/node/src/test/kotlin/net/corda/node/services/DistributedImmutableMapTests.kt @@ -2,6 +2,7 @@ package net.corda.node.services import com.google.common.net.HostAndPort import io.atomix.catalyst.transport.Address +import io.atomix.copycat.client.ConnectionStrategies import io.atomix.copycat.client.CopycatClient import io.atomix.copycat.server.CopycatServer import io.atomix.copycat.server.storage.Storage @@ -105,7 +106,9 @@ class DistributedImmutableMapTests { server.bootstrap() } - val client = CopycatClient.builder(address).build() + val client = CopycatClient.builder(address) + .withConnectionStrategy(ConnectionStrategies.EXPONENTIAL_BACKOFF) + .build() return serverInitFuture.thenCompose { client.connect(address) }.thenApply { Member(it, server) } } } \ No newline at end of file