mirror of
https://github.com/corda/corda.git
synced 2025-06-19 15:43:52 +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:
@ -126,7 +126,9 @@ class RetryFlowMockTest {
|
|||||||
ReceiveFlow3.lock.release()
|
ReceiveFlow3.lock.release()
|
||||||
assertTrue(expectedMessagesSent.await(20, TimeUnit.SECONDS))
|
assertTrue(expectedMessagesSent.await(20, TimeUnit.SECONDS))
|
||||||
assertEquals(3, messagesSent.size)
|
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)
|
@Test(timeout=300_000)
|
||||||
|
Reference in New Issue
Block a user