Print out exceptions in the attachment demo test.

This commit is contained in:
Mike Hearn 2017-02-03 12:48:22 +01:00
parent cc20a10225
commit f8292f8148

View File

@ -19,20 +19,21 @@ class AttachmentDemoTest {
startNode("Notary", setOf(ServiceInfo(SimpleNotaryService.Companion.type)))
).getOrThrow()
val senderThread = CompletableFuture.runAsync {
val senderThread = CompletableFuture.supplyAsync {
nodeA.rpcClientToNode().use(demoUser[0].username, demoUser[0].password) {
sender(this)
}
}
val recipientThread = CompletableFuture.runAsync {
}.exceptionally { it.printStackTrace() }
val recipientThread = CompletableFuture.supplyAsync{
nodeB.rpcClientToNode().use(demoUser[0].username, demoUser[0].password) {
recipient(this)
}
}
}.exceptionally { it.printStackTrace() }
// Just check they don't throw any exceptions.d
recipientThread.get()
// Just check they finish and don't throw any exceptions.
senderThread.get()
recipientThread.get()
}, isDebug = true)
}
}