mirror of
https://github.com/corda/corda.git
synced 2024-12-21 22:07:55 +00:00
Print out exceptions in the attachment demo test.
This commit is contained in:
parent
cc20a10225
commit
f8292f8148
@ -19,20 +19,21 @@ class AttachmentDemoTest {
|
|||||||
startNode("Notary", setOf(ServiceInfo(SimpleNotaryService.Companion.type)))
|
startNode("Notary", setOf(ServiceInfo(SimpleNotaryService.Companion.type)))
|
||||||
).getOrThrow()
|
).getOrThrow()
|
||||||
|
|
||||||
val senderThread = CompletableFuture.runAsync {
|
val senderThread = CompletableFuture.supplyAsync {
|
||||||
nodeA.rpcClientToNode().use(demoUser[0].username, demoUser[0].password) {
|
nodeA.rpcClientToNode().use(demoUser[0].username, demoUser[0].password) {
|
||||||
sender(this)
|
sender(this)
|
||||||
}
|
}
|
||||||
}
|
}.exceptionally { it.printStackTrace() }
|
||||||
val recipientThread = CompletableFuture.runAsync {
|
|
||||||
|
val recipientThread = CompletableFuture.supplyAsync{
|
||||||
nodeB.rpcClientToNode().use(demoUser[0].username, demoUser[0].password) {
|
nodeB.rpcClientToNode().use(demoUser[0].username, demoUser[0].password) {
|
||||||
recipient(this)
|
recipient(this)
|
||||||
}
|
}
|
||||||
}
|
}.exceptionally { it.printStackTrace() }
|
||||||
|
|
||||||
// Just check they don't throw any exceptions.d
|
// Just check they finish and don't throw any exceptions.
|
||||||
recipientThread.get()
|
|
||||||
senderThread.get()
|
senderThread.get()
|
||||||
|
recipientThread.get()
|
||||||
}, isDebug = true)
|
}, isDebug = true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user