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:
Clinton 2017-06-30 16:29:57 +01:00 committed by GitHub
parent c1088038b7
commit 562b186a65
2 changed files with 6 additions and 1 deletions

View File

@ -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

View File

@ -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