From ac1fb4db1a5fd86c469e43f0829854e92ff4f064 Mon Sep 17 00:00:00 2001 From: Luciano Viana Date: Tue, 15 Oct 2024 11:12:33 +0200 Subject: [PATCH 01/10] fixing inderterminism in FIXP session disconnect timeout test --- .../system_tests/BinaryEntryPointSystemTest.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/artio-binary-entrypoint-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/BinaryEntryPointSystemTest.java b/artio-binary-entrypoint-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/BinaryEntryPointSystemTest.java index 4cff99d146..6451df959c 100644 --- a/artio-binary-entrypoint-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/BinaryEntryPointSystemTest.java +++ b/artio-binary-entrypoint-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/BinaryEntryPointSystemTest.java @@ -43,6 +43,7 @@ import uk.co.real_logic.artio.session.Session; import java.io.IOException; +import java.time.Duration; import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.locks.LockSupport; @@ -402,13 +403,15 @@ public void shouldDisconnectIfNegotiateTimeout() throws IOException { setupArtio(TEST_NO_LOGON_DISCONNECT_TIMEOUT_IN_MS, 1); - final long timeInMs = System.currentTimeMillis(); + // taking from the same clock used by the framer which gives more accuracy + final long timeInNs = nanoClock.nanoTime(); try (BinaryEntryPointClient client = newClient()) { client.assertDisconnected(); - final long durationInMs = System.currentTimeMillis() - timeInMs; - final long acceptableLowerBoundInMs = TEST_NO_LOGON_DISCONNECT_TIMEOUT_IN_MS - TIMEOUT_EPSILON_IN_MS; - assertThat(durationInMs, Matchers.greaterThanOrEqualTo(acceptableLowerBoundInMs)); + final long acceptableLowerBoundInMs = Duration.ofMillis(TEST_NO_LOGON_DISCONNECT_TIMEOUT_IN_MS) + .minusMillis(TIMEOUT_EPSILON_IN_MS).toNanos(); + final long durationInNs = nanoClock.nanoTime() - timeInNs; + assertThat(durationInNs, Matchers.greaterThanOrEqualTo(acceptableLowerBoundInMs)); } // Test that we can still establish the connection after this @@ -1333,6 +1336,7 @@ private void shouldPruneAwayOldArchivePositions( exchangeOverASegmentOfMessages(finishSending); + testSystem.await("connection is still on", () -> !connection.isConnected()); resetOp.reset(); assertPruneWorks(); @@ -1391,6 +1395,7 @@ private void exchangeOverASegmentOfMessages(final boolean finishSending) throws acceptorInitiatedFinishSending(client, overASegmentOfMessages); } } + assertConnectionDisconnected(); } // ---------------------------------- From dc9eb3b1522217530d82532bc0484725f934e403 Mon Sep 17 00:00:00 2001 From: Luciano Viana Date: Mon, 14 Oct 2024 11:11:07 +0200 Subject: [PATCH 02/10] printing streams ids when launching the engines/libraries in tests --- .../AbstractBinaryEntryPointSystemTest.java | 4 ++-- .../AbstractGatewayToGatewaySystemTest.java | 4 ++-- .../real_logic/artio/system_tests/SystemTestUtil.java | 11 +++++++---- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/artio-binary-entrypoint-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/AbstractBinaryEntryPointSystemTest.java b/artio-binary-entrypoint-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/AbstractBinaryEntryPointSystemTest.java index dce2a3e58a..74b2ca1c52 100644 --- a/artio-binary-entrypoint-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/AbstractBinaryEntryPointSystemTest.java +++ b/artio-binary-entrypoint-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/AbstractBinaryEntryPointSystemTest.java @@ -152,7 +152,7 @@ void setupJustArtio( .epochNanoClock(nanoClock) .senderMaxBytesInBuffer(senderMaxBytesInBuffer); - engineConfig.errorHandlerFactory(ffs -> Throwable::printStackTrace); + engineConfig.errorHandlerFactory(ffs -> Throwable::printStackTrace).printAeronStreamIdentifiers(true); engineConfig.acceptorFixPKeepaliveTimeoutInMs(artioKeepAliveIntervalInMs); configureAeronArchive(engineConfig.aeronArchiveContext()); @@ -192,7 +192,7 @@ FixLibrary launchLibrary( .fixPAcceptedSessionMaxRetransmissionRange(fixPAcceptedSessionMaxRetransmissionRange) .epochNanoClock(nanoClock); - libraryConfig.acceptorFixPKeepaliveTimeoutInMs(artioKeepAliveIntervalInMs); + libraryConfig.acceptorFixPKeepaliveTimeoutInMs(artioKeepAliveIntervalInMs).printAeronStreamIdentifiers(true); if (!printErrors) { diff --git a/artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/AbstractGatewayToGatewaySystemTest.java b/artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/AbstractGatewayToGatewaySystemTest.java index 55e0a81903..2c8241ab68 100644 --- a/artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/AbstractGatewayToGatewaySystemTest.java +++ b/artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/AbstractGatewayToGatewaySystemTest.java @@ -122,7 +122,7 @@ void launchGatewayToGateway() final EngineConfiguration initiatingConfig = initiatingConfig(libraryAeronPort, nanoClock); initiatingConfig.deleteLogFileDirOnStart(true); - initiatingConfig.monitoringAgentFactory(MonitoringAgentFactory.none()); + initiatingConfig.monitoringAgentFactory(MonitoringAgentFactory.none()).printAeronStreamIdentifiers(true); initiatingEngine = FixEngine.launch(initiatingConfig); final LibraryConfiguration acceptingLibraryConfig = acceptingLibraryConfig(acceptingHandler, nanoClock); @@ -130,7 +130,7 @@ void launchGatewayToGateway() final LibraryConfiguration initiatingLibraryConfig = initiatingLibraryConfig( libraryAeronPort, initiatingHandler, nanoClock); - initiatingLibraryConfig.resendRequestController(fakeResendRequestController); + initiatingLibraryConfig.resendRequestController(fakeResendRequestController).printAeronStreamIdentifiers(true); initiatingLibrary = connect(initiatingLibraryConfig); testSystem = new TestSystem(acceptingLibrary, initiatingLibrary); diff --git a/artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/SystemTestUtil.java b/artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/SystemTestUtil.java index 31a362818b..8b64595fd6 100644 --- a/artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/SystemTestUtil.java +++ b/artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/SystemTestUtil.java @@ -261,7 +261,8 @@ static EngineConfiguration initiatingConfig(final int libraryAeronPort, final Ep .logFileDir(CLIENT_LOGS) .scheduler(new LowResourceEngineScheduler()) .slowConsumerTimeoutInMs(TEST_REPLY_TIMEOUT_IN_MS) - .replyTimeoutInMs(TEST_REPLY_TIMEOUT_IN_MS); + .replyTimeoutInMs(TEST_REPLY_TIMEOUT_IN_MS) + .printAeronStreamIdentifiers(true); configuration.epochNanoClock(nanoClock); configuration.agentNamePrefix("init-"); configureAeronArchive(configuration.aeronArchiveContext()); @@ -309,7 +310,8 @@ static EngineConfiguration acceptingConfig( .logFileDir(acceptorLogs) .scheduler(new LowResourceEngineScheduler()) .slowConsumerTimeoutInMs(TEST_REPLY_TIMEOUT_IN_MS) - .replyTimeoutInMs(TEST_REPLY_TIMEOUT_IN_MS); + .replyTimeoutInMs(TEST_REPLY_TIMEOUT_IN_MS) + .printAeronStreamIdentifiers(true); } static String acceptorMonitoringFile(final String countersSuffix) @@ -328,7 +330,8 @@ static LibraryConfiguration acceptingLibraryConfig( .sessionAcquireHandler(sessionHandler) .libraryAeronChannels(singletonList(IPC_CHANNEL)) .libraryName("accepting") - .replyTimeoutInMs(TEST_REPLY_TIMEOUT_IN_MS); + .replyTimeoutInMs(TEST_REPLY_TIMEOUT_IN_MS) + .printAeronStreamIdentifiers(true); return libraryConfiguration; } @@ -411,7 +414,7 @@ static LibraryConfiguration initiatingLibraryConfig( .libraryAeronChannels(singletonList("aeron:udp?endpoint=localhost:" + libraryAeronPort)) .libraryName("initiating") .replyTimeoutInMs(TEST_REPLY_TIMEOUT_IN_MS); - config.epochNanoClock(nanoClock); + config.epochNanoClock(nanoClock).printAeronStreamIdentifiers(true); return config; } From 52cb75d7f1da130906e8c1915d2054358441c187 Mon Sep 17 00:00:00 2001 From: Luciano Viana Date: Thu, 17 Oct 2024 11:27:06 +0200 Subject: [PATCH 03/10] increasing test replyTimeout to avoid early library timeouts --- .../artio/system_tests/EngineAndLibraryIntegrationTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/EngineAndLibraryIntegrationTest.java b/artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/EngineAndLibraryIntegrationTest.java index 773f0a8634..a5d5fde2c6 100644 --- a/artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/EngineAndLibraryIntegrationTest.java +++ b/artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/EngineAndLibraryIntegrationTest.java @@ -49,7 +49,7 @@ public class EngineAndLibraryIntegrationTest { - private static final int SHORT_TIMEOUT_IN_MS = 100; + private static final int SHORT_TIMEOUT_IN_MS = 500; private final EpochNanoClock nanoClock = new OffsetEpochNanoClock(); private ArchivingMediaDriver mediaDriver; From e66d19208c83b9569ae52257b60cca132bb72c79 Mon Sep 17 00:00:00 2001 From: Luciano Viana Date: Fri, 18 Oct 2024 09:36:29 +0200 Subject: [PATCH 04/10] protecting SequenceNumberIndexTest against back pressure --- .../engine/logger/SequenceNumberIndexTest.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/artio-core/src/test/java/uk/co/real_logic/artio/engine/logger/SequenceNumberIndexTest.java b/artio-core/src/test/java/uk/co/real_logic/artio/engine/logger/SequenceNumberIndexTest.java index 7bf5ed1161..3d636e9eb2 100644 --- a/artio-core/src/test/java/uk/co/real_logic/artio/engine/logger/SequenceNumberIndexTest.java +++ b/artio-core/src/test/java/uk/co/real_logic/artio/engine/logger/SequenceNumberIndexTest.java @@ -240,10 +240,15 @@ private void indexRedactSequenceMessage(final long fixMessageToRedactPosition) publication, mock(AtomicCounter.class), YieldingIdleStrategy.INSTANCE, mock(EpochNanoClock.class), 1); - final long redactMessagePosition = gatewayPublication.saveRedactSequenceUpdate( - SESSION_ID, SEQUENCE_NUMBER, fixMessageToRedactPosition); + long position = 0L; + while (position < 1) + { + position = gatewayPublication.saveRedactSequenceUpdate( + SESSION_ID, SEQUENCE_NUMBER, fixMessageToRedactPosition); + Thread.yield(); + } - indexToPosition(publication.sessionId(), redactMessagePosition); + indexToPosition(publication.sessionId(), position); } } @@ -427,16 +432,18 @@ public void shouldResetSequenceNumberForSessionAfterRestart() indexFixMessage(); assertLastKnownSequenceNumberIs(SESSION_ID, SEQUENCE_NUMBER); - bufferContainsExampleMessage(false, SESSION_ID + 1, SEQUENCE_NUMBER + 5, + bufferContainsExampleMessage(false, SESSION_ID_2, SEQUENCE_NUMBER + 5, SEQUENCE_INDEX); indexRecord(); - assertLastKnownSequenceNumberIs(SESSION_ID + 1, SEQUENCE_NUMBER + 5); + assertLastKnownSequenceNumberIs(SESSION_ID_2, SEQUENCE_NUMBER + 5); + assertLastKnownSequenceNumberIs(SESSION_ID, SEQUENCE_NUMBER); writer.close(); writer = newWriter(inMemoryBuffer); resetSequenceNumber(SESSION_ID); assertLastKnownSequenceNumberIs(SESSION_ID, 0); + assertLastKnownSequenceNumberIs(SESSION_ID_2, SEQUENCE_NUMBER + 5); // this should write to old session place and not to same as previous call resetSequenceNumber(SESSION_ID_2); From 348b307ddca537a44d079f61164cff59df68b509 Mon Sep 17 00:00:00 2001 From: Luciano Viana Date: Fri, 18 Oct 2024 09:39:34 +0200 Subject: [PATCH 05/10] protecting PersistentSequenceNumberResendRequestSystemTest against race in two publications consumed by indexer on logout msg and disconnect. --- ...ersistentSequenceNumberResendRequestSystemTest.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/PersistentSequenceNumberResendRequestSystemTest.java b/artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/PersistentSequenceNumberResendRequestSystemTest.java index 7ca1ae1d93..c794e7eaee 100644 --- a/artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/PersistentSequenceNumberResendRequestSystemTest.java +++ b/artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/PersistentSequenceNumberResendRequestSystemTest.java @@ -140,7 +140,15 @@ public void shouldReplayMessageBeforeARestart() public void shouldNotBeAbleToReplayMessagesFromBeforeReset1() { // reset when ReplayIndex instances exist - shouldNotBeAbleToReplayMessagesFromBeforeReset0(() -> {}); + shouldNotBeAbleToReplayMessagesFromBeforeReset0(() -> + { + // this is to ensure the logout msg notification is received by the indexer before the session disconnect + // as they both come from different publications + awaitIndexerCaughtUp(testSystem, + mediaDriver.mediaDriver().aeronDirectoryName(), + acceptingEngine, + acceptingLibrary); + }); } @Test(timeout = TEST_TIMEOUT_IN_MS) From ce17b7494c3d84757221a70d61e92e85ff92f580 Mon Sep 17 00:00:00 2001 From: Luciano Viana Date: Fri, 18 Oct 2024 12:17:30 +0200 Subject: [PATCH 06/10] script to build and run artio build in different containers --- run-build-in-containers.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 run-build-in-containers.sh diff --git a/run-build-in-containers.sh b/run-build-in-containers.sh new file mode 100755 index 0000000000..6a0eb089a8 --- /dev/null +++ b/run-build-in-containers.sh @@ -0,0 +1,17 @@ +docker rm -f artio1 +docker rm -f artio2 +docker rm -f artio3 +docker rm -f artio4 +docker build -t artio . +docker run -d --cpus 1 --name artio1 artio +docker run -d --cpus 1 --name artio2 artio +docker run -d --cpus 1 --name artio3 artio +docker run -d --cpus 1 --name artio4 artio + +echo +echo 'Execute the following to monitor the logs for test failures :' + +echo 'docker logs artio1 -f | grep FAILED' +echo 'docker logs artio2 -f | grep FAILED' +echo 'docker logs artio3 -f | grep FAILED' +echo 'docker logs artio4 -f | grep FAILED' From 7c0a5b12618a3ed51704da7f3314a4bd2f20e9bf Mon Sep 17 00:00:00 2001 From: Luciano Viana Date: Mon, 21 Oct 2024 10:24:34 +0200 Subject: [PATCH 07/10] increasing non windows timeouts to 3s --- .../artio/system_tests/CancelOnDisconnectSystemTest.java | 3 +-- .../uk/co/real_logic/artio/system_tests/SystemTestUtil.java | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/CancelOnDisconnectSystemTest.java b/artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/CancelOnDisconnectSystemTest.java index 3847f5621f..9212934623 100644 --- a/artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/CancelOnDisconnectSystemTest.java +++ b/artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/CancelOnDisconnectSystemTest.java @@ -41,7 +41,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import static uk.co.real_logic.artio.CancelOnDisconnectType.*; -import static uk.co.real_logic.artio.CommonConfiguration.RUNNING_ON_WINDOWS; import static uk.co.real_logic.artio.Constants.LOGON_MESSAGE_AS_STR; import static uk.co.real_logic.artio.TestFixtures.launchMediaDriver; import static uk.co.real_logic.artio.system_tests.SystemTestUtil.*; @@ -49,7 +48,7 @@ public class CancelOnDisconnectSystemTest extends AbstractGatewayToGatewaySystemTest { public static final int COD_TEST_TIMEOUT_IN_MS = 500; - public static final int LONG_COD_TEST_TIMEOUT_IN_MS = RUNNING_ON_WINDOWS ? 3_000 : COD_TEST_TIMEOUT_IN_MS; + public static final int LONG_COD_TEST_TIMEOUT_IN_MS = 3_000; public static final Class FIX_DICTIONARY_WITHOUT_COD = FixDictionaryImpl.class; private long now; diff --git a/artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/SystemTestUtil.java b/artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/SystemTestUtil.java index 8b64595fd6..d6c0e1b92a 100644 --- a/artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/SystemTestUtil.java +++ b/artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/SystemTestUtil.java @@ -90,7 +90,7 @@ public final class SystemTestUtil private static final String HI_ID = "hi"; - public static final long TEST_REPLY_TIMEOUT_IN_MS = RUNNING_ON_WINDOWS ? 3_000 : 1_000; + public static final long TEST_REPLY_TIMEOUT_IN_MS = 3_000; private static final int TEST_COMPACTION_SIZE = 1024 * 1024; From 2b4c82bfa2de542a10889ef5e2956af924d45b96 Mon Sep 17 00:00:00 2001 From: Luciano Viana Date: Mon, 21 Oct 2024 12:00:06 +0200 Subject: [PATCH 08/10] adding awaitIndexerCaughtUp to avoid indeterminism between test thread and index update --- .../artio/system_tests/BinaryEntryPointSystemTest.java | 6 ++++++ .../artio/system_tests/MessageBasedAcceptorSystemTest.java | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/artio-binary-entrypoint-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/BinaryEntryPointSystemTest.java b/artio-binary-entrypoint-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/BinaryEntryPointSystemTest.java index 6451df959c..5c60392358 100644 --- a/artio-binary-entrypoint-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/BinaryEntryPointSystemTest.java +++ b/artio-binary-entrypoint-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/BinaryEntryPointSystemTest.java @@ -66,6 +66,7 @@ import static uk.co.real_logic.artio.system_tests.BinaryEntryPointClient.*; import static uk.co.real_logic.artio.system_tests.FakeBinaryEntrypointConnectionHandler.sendExecutionReportNew; import static uk.co.real_logic.artio.system_tests.FakeFixPConnectionExistsHandler.requestSession; +import static uk.co.real_logic.artio.system_tests.SystemTestUtil.awaitIndexerCaughtUp; import static uk.co.real_logic.artio.system_tests.SystemTestUtil.initiate; import static uk.co.real_logic.artio.system_tests.SystemTestUtil.libraries; @@ -449,6 +450,7 @@ public void shouldAcceptReEstablishmentOfSession() throws IOException reEstablishConnection(2, 2); restartArtio(); + reEstablishConnection(3, 3); } @@ -2191,6 +2193,10 @@ private void withReEstablishedConnection( final int nextSeqNo = alreadyRecvMsgCount + 1; client.writeEstablish(nextSeqNo); + // if not this, then sometimes the 'alreadyRecvMsgCount' does not match 'nextSeqNo' below when calling + // readEstablishAck + awaitIndexerCaughtUp(testSystem, mediaDriver.mediaDriver().aeronDirectoryName(), engine, library); + libraryAcquiresConnection(client, connectionExistsHandler, connectionAcquiredHandler, offlineOwned); client.readEstablishAck(nextSeqNo, alreadyRecvMsgCount); diff --git a/artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/MessageBasedAcceptorSystemTest.java b/artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/MessageBasedAcceptorSystemTest.java index a652417deb..d6498740f3 100644 --- a/artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/MessageBasedAcceptorSystemTest.java +++ b/artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/MessageBasedAcceptorSystemTest.java @@ -601,6 +601,10 @@ public void shouldSupportLogonBasedSequenceNumberResetWithMessagesSentBeforeLogo testSystem.awaitMessageOf(otfAcceptor, EXECUTION_REPORT_MESSAGE_AS_STR, msg -> msg.messageSequenceNumber() == seqNum2 && msg.sequenceIndex() == 1); + // to ensure the indexes are processed before resend request is received - which would mean a gapfill + // responded rather than a replay msg + awaitIndexerCaughtUp(testSystem, mediaDriver.mediaDriver().aeronDirectoryName(), engine, library); + connection.sendResendRequest(2, 2); testSystem.awaitBlocking( () -> assertEquals(Side.SELL, connection.readResentExecutionReport(2).sideAsEnum())); From 41981acf03d7d83da7ec4a10c88b84a8da3d43ba Mon Sep 17 00:00:00 2001 From: Luciano Viana Date: Mon, 21 Oct 2024 17:34:11 +0200 Subject: [PATCH 09/10] fixing indeterminism in GatewayToGatewaySystemTest --- .../artio/system_tests/GatewayToGatewaySystemTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/GatewayToGatewaySystemTest.java b/artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/GatewayToGatewaySystemTest.java index be5429120e..331579345d 100644 --- a/artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/GatewayToGatewaySystemTest.java +++ b/artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/GatewayToGatewaySystemTest.java @@ -114,6 +114,7 @@ public void messagesCanBeSentFromInitiatorToAcceptingLibrary() assertSequenceIndicesAre(0); + testSystem.await("messageTimingHandler.count() is not 2", () -> messageTimingHandler.count() == 2); messageTimingHandler.verifyConsecutiveSequenceNumbers(2); } From 9f728b327871f637241587e45f24d2fb57b3899f Mon Sep 17 00:00:00 2001 From: Luciano Viana Date: Tue, 22 Oct 2024 11:32:24 +0200 Subject: [PATCH 10/10] increasing disconnect timeout to improve accuracy --- .../system_tests/AbstractBinaryEntryPointSystemTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/artio-binary-entrypoint-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/AbstractBinaryEntryPointSystemTest.java b/artio-binary-entrypoint-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/AbstractBinaryEntryPointSystemTest.java index 74b2ca1c52..ff5e4b5c5f 100644 --- a/artio-binary-entrypoint-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/AbstractBinaryEntryPointSystemTest.java +++ b/artio-binary-entrypoint-system-tests/src/test/java/uk/co/real_logic/artio/system_tests/AbstractBinaryEntryPointSystemTest.java @@ -62,8 +62,8 @@ public class AbstractBinaryEntryPointSystemTest public static final long TEST_TIMEOUT_IN_MS = 20_000L; static final int AWAIT_TIMEOUT_IN_MS = 10_000; - static final int TIMEOUT_EPSILON_IN_MS = 10; - static final int TEST_NO_LOGON_DISCONNECT_TIMEOUT_IN_MS = 200; + static final int TIMEOUT_EPSILON_IN_MS = 50; + static final int TEST_NO_LOGON_DISCONNECT_TIMEOUT_IN_MS = 2000; final EpochNanoClock nanoClock = new OffsetEpochNanoClock(); final int port = unusedPort();