mirror of
https://github.com/corda/corda.git
synced 2024-12-23 14:52:29 +00:00
DistributedImmutableMapTest: enable copycat client connection retry to avoid race conditions
This commit is contained in:
parent
3a52a3aa66
commit
ad5d6f5cd4
@ -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) }
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user