以下流程测试在 Corda 3 中有效...
自从更新为使用Corda 4后,现在出现以下异常:
@Test
fun `can ping counterparties`() {
val acceptorFlowFutures = listOf(nodeB, nodeC).map {
it.registerInitiatedFlow(SendPingAcceptorFlow::class.java).toFuture()
}
nodeA.startFlow(SendPingInitiatorFlow("Ping!"))
network.runNetwork()
acceptorFlowFutures.forEach {
val result = it
.getOrThrow(Duration.ofMinutes(1)) // Timeout failure here
.stateMachine
.resultFuture
.getOrThrow(Duration.ofMinutes(1)) as String
assertEquals("Ping!", result)
}
}
自从更新为使用Corda 4后,现在出现以下异常:
这是什么原因造成的?java.util.concurrent.TimeoutException