Skip to content

Commit 91c76fc

Browse files
committed
fixing another indeterminism around index update
1 parent 29b9b6f commit 91c76fc

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

artio-binary-entrypoint-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/BinaryEntryPointSystemTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -451,9 +451,6 @@ public void shouldAcceptReEstablishmentOfSession() throws IOException
451451

452452
restartArtio();
453453

454-
// if not this, then sometimes the 'alreadyRecvMsgCount' does not match 'nextSeqNo' below when calling
455-
// readEstablishAck
456-
awaitIndexerCaughtUp(testSystem, mediaDriver.mediaDriver().aeronDirectoryName(), engine, library);
457454
reEstablishConnection(3, 3);
458455
}
459456

@@ -2193,6 +2190,10 @@ private void withReEstablishedConnection(
21932190
{
21942191
try (BinaryEntryPointClient client = newClient())
21952192
{
2193+
// if not this, then sometimes the 'alreadyRecvMsgCount' does not match 'nextSeqNo' below when calling
2194+
// readEstablishAck
2195+
awaitIndexerCaughtUp(testSystem, mediaDriver.mediaDriver().aeronDirectoryName(), engine, library);
2196+
21962197
final int nextSeqNo = alreadyRecvMsgCount + 1;
21972198
client.writeEstablish(nextSeqNo);
21982199

artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/MessageBasedAcceptorSystemTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,10 @@ public void shouldSupportLogonBasedSequenceNumberResetWithMessagesSentBeforeLogo
601601
testSystem.awaitMessageOf(otfAcceptor, EXECUTION_REPORT_MESSAGE_AS_STR,
602602
msg -> msg.messageSequenceNumber() == seqNum2 && msg.sequenceIndex() == 1);
603603

604+
// to ensure the indexes are processed before resend request is received - which would mean a gapfill
605+
// responded rather than a replay msg
606+
awaitIndexerCaughtUp(testSystem, mediaDriver.mediaDriver().aeronDirectoryName(), engine, library);
607+
604608
connection.sendResendRequest(2, 2);
605609
testSystem.awaitBlocking(
606610
() -> assertEquals(Side.SELL, connection.readResentExecutionReport(2).sideAsEnum()));

0 commit comments

Comments
 (0)