mirror of
https://github.com/corda/corda.git
synced 2025-02-18 16:40:55 +00:00
Fix IntegrationTestingTutorial network map race condition (#947)
* Ignoring and adding a TODO to a test that fails spuriously during CI. * Ensure both parties are regsitered with network map in the integration test tutorial and update docs to reflect this best practice. * Minor readability fix.
This commit is contained in:
parent
c1088038b7
commit
562b186a65
@ -51,6 +51,9 @@ class IntegrationTestingTutorial {
|
||||
|
||||
val bobClient = bob.rpcClientToNode()
|
||||
val bobProxy = bobClient.start("bobUser", "testPassword2").proxy
|
||||
|
||||
aliceProxy.waitUntilRegisteredWithNetworkMap().getOrThrow()
|
||||
bobProxy.waitUntilRegisteredWithNetworkMap().getOrThrow()
|
||||
// END 2
|
||||
|
||||
// START 3
|
||||
|
@ -35,7 +35,9 @@ notary directly, so there's no need to pass in the test ``User``.
|
||||
The ``startNode`` function returns a future that completes once the
|
||||
node is fully started. This allows starting of the nodes to be
|
||||
parallel. We wait on these futures as we need the information
|
||||
returned; their respective ``NodeHandles`` s.
|
||||
returned; their respective ``NodeHandles`` s. After getting the handles we
|
||||
wait for both parties to register with the network map to ensure we don't
|
||||
have race conditions with network map registration.
|
||||
|
||||
.. literalinclude:: example-code/src/integration-test/kotlin/net/corda/docs/IntegrationTestingTutorial.kt
|
||||
:language: kotlin
|
||||
|
Loading…
x
Reference in New Issue
Block a user