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

@ -22,13 +22,12 @@ fun main(args: Array<String>) {
startFlow<SellerFlow>(),
all())
val demoUser = listOf(User("demo", "demo", permissions))
driver(driverDirectory = "build" / "trader-demo-nodes", isDebug = true) {
driver(driverDirectory = "build" / "trader-demo-nodes", isDebug = true, waitForAllNodesToFinish = true) {
val user = User("user1", "test", permissions = setOf(startFlow<CashIssueFlow>(),
startFlow<CommercialPaperIssueFlow>(),
startFlow<SellerFlow>()))
startNode(providedName = DUMMY_BANK_A.name, rpcUsers = demoUser)
startNode(providedName = DUMMY_BANK_B.name, rpcUsers = demoUser)
startNode(providedName = BOC.name, rpcUsers = listOf(user))
waitForAllNodesToFinish()
}
}