mirror of
https://github.com/corda/corda.git
synced 2025-06-13 04:38:19 +00:00
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:
@ -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()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user