On exit, the driver will automaticallly shutdown any nodes which weren't waited for.

The motivation for this came with the recent change that a default notary is started by the driver, which if ignored will leak the notary process.

Also, waitForAllNodesToFinish() has been replaced by a driver parameter.
This commit is contained in:
Shams Asari
2017-11-06 14:24:27 +00:00
parent b0af1c715c
commit 2fe41715cc
17 changed files with 187 additions and 193 deletions

View File

@ -48,7 +48,7 @@ fun main(args: Array<String>) {
startFlow<CashExitFlow>(),
invokeRpc(CordaRPCOps::nodeInfo)
))
driver(driverDirectory = baseDirectory, extraCordappPackagesToScan = listOf("net.corda.finance")) {
driver(driverDirectory = baseDirectory, extraCordappPackagesToScan = listOf("net.corda.finance"), waitForAllNodesToFinish = true) {
val node = startNode(providedName = ALICE.name, rpcUsers = listOf(user)).get()
// END 1
@ -96,7 +96,6 @@ fun main(args: Array<String>) {
graph.display()
}
}
waitForAllNodesToFinish()
// END 5
}
}