mirror of
https://github.com/corda/corda.git
synced 2025-01-30 16:14:39 +00:00
CORDA-4045 Adjust test to remove scope for race conditions (#6769)
Change assertion in `Restart does not set senderUUID` to verify a single message has a sender UUID set, rather than the last to be recorded as sent has no sender UUID.
This commit is contained in:
parent
2790e945c6
commit
eb65cdc08a
@ -126,7 +126,9 @@ class RetryFlowMockTest {
|
||||
ReceiveFlow3.lock.release()
|
||||
assertTrue(expectedMessagesSent.await(20, TimeUnit.SECONDS))
|
||||
assertEquals(3, messagesSent.size)
|
||||
assertNull(messagesSent.last().senderUUID)
|
||||
// CORDA-4045: We can't be sure that the last message sent will be the last we record, so
|
||||
// instead check we have exactly one message (the first) with sender UUID
|
||||
assertNotNull(messagesSent.singleOrNull { it.senderUUID != null })
|
||||
}
|
||||
|
||||
@Test(timeout=300_000)
|
||||
|
Loading…
x
Reference in New Issue
Block a user