mirror of
https://github.com/corda/corda.git
synced 2025-06-01 07:00:54 +00:00
CORDA-3291 Support for new flow sleep in mock networks (#6200)
The new flow sleep made `NotaryWhitelistTests` flaky which highlighted an issue with the change to how a flow sleeps. Messages were being pumped while the flow was sleeping which lead to inconsistent behaviour. Messages are no longer pumped while a flow sleeps.
This commit is contained in:
parent
7309949abf
commit
66f241efe8
@ -550,7 +550,11 @@ open class InternalMockNetwork(cordappPackages: List<String> = emptyList(),
|
|||||||
|
|
||||||
return allActiveFlows.any {
|
return allActiveFlows.any {
|
||||||
val flowState = it.snapshot().checkpoint.flowState
|
val flowState = it.snapshot().checkpoint.flowState
|
||||||
flowState is FlowState.Started && flowState.flowIORequest is FlowIORequest.ExecuteAsyncOperation
|
flowState is FlowState.Started && when (flowState.flowIORequest) {
|
||||||
|
is FlowIORequest.ExecuteAsyncOperation -> true
|
||||||
|
is FlowIORequest.Sleep -> true
|
||||||
|
else -> false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user