mirror of
https://github.com/corda/corda.git
synced 2025-01-21 03:55:00 +00:00
Fixed a few instances of waitUntilNetworkReady() to fix flaky tests. (#1785)
This commit is contained in:
parent
4fa63d07dd
commit
e6e3c29d74
@ -129,7 +129,7 @@ class AttachmentLoadingTests : TestDependencyInjectionBase() {
|
||||
startNode(providedName = bankBName, rpcUsers = listOf(adminUser)),
|
||||
startNode(providedName = notaryName, rpcUsers = listOf(adminUser), advertisedServices = setOf(ServiceInfo(SimpleNotaryService.type)))
|
||||
).transpose().getOrThrow() // Wait for all nodes to start up.
|
||||
nodes.forEach { it.rpc.waitUntilNetworkReady() }
|
||||
nodes.forEach { it.rpc.waitUntilNetworkReady().getOrThrow() }
|
||||
return nodes
|
||||
}
|
||||
}
|
||||
|
@ -33,8 +33,8 @@ class BankOfCordaRPCClientTest {
|
||||
// Big Corporation RPC Client
|
||||
val bigCorpClient = nodeBigCorporation.rpcClientToNode()
|
||||
val bigCorpProxy = bigCorpClient.start("bigCorpCFO", "password2").proxy
|
||||
bocProxy.waitUntilNetworkReady()
|
||||
bigCorpProxy.waitUntilNetworkReady()
|
||||
bocProxy.waitUntilNetworkReady().getOrThrow()
|
||||
bigCorpProxy.waitUntilNetworkReady().getOrThrow()
|
||||
|
||||
// Register for Bank of Corda Vault updates
|
||||
val criteria = QueryCriteria.VaultQueryCriteria(status = Vault.StateStatus.ALL)
|
||||
|
@ -36,7 +36,7 @@ class BankOfCordaClientApi(val hostAndPort: NetworkHostAndPort) {
|
||||
// TODO: privileged security controls required
|
||||
client.start("bankUser", "test").use { connection ->
|
||||
val rpc = connection.proxy
|
||||
rpc.waitUntilNetworkReady()
|
||||
rpc.waitUntilNetworkReady().getOrThrow()
|
||||
|
||||
// Resolve parties via RPC
|
||||
val issueToParty = rpc.wellKnownPartyFromX500Name(params.issueToPartyName)
|
||||
|
@ -132,10 +132,9 @@ class ExplorerSimulation(val options: OptionSet) {
|
||||
issuerNodeGBP.nodeInfo.legalIdentities.first() to issuerRPCGBP,
|
||||
issuerNodeUSD.nodeInfo.legalIdentities.first() to issuerRPCUSD))
|
||||
|
||||
aliceRPC.waitUntilNetworkReady()
|
||||
bobRPC.waitUntilNetworkReady()
|
||||
issuerRPCGBP.waitUntilNetworkReady()
|
||||
issuerRPCUSD.waitUntilNetworkReady()
|
||||
listOf(aliceRPC, bobRPC, issuerRPCGBP, issuerRPCUSD).map {
|
||||
it.waitUntilNetworkReady().getOrThrow()
|
||||
}
|
||||
}
|
||||
|
||||
private fun startSimulation(eventGenerator: EventGenerator, maxIterations: Int) {
|
||||
|
Loading…
Reference in New Issue
Block a user