This is an automated email from the ASF dual-hosted git repository. bschuchardt pushed a commit to branch feature/GEODE-8021 in repository https://gitbox.apache.org/repos/asf/geode.git
commit 022f6049fc84df3ae929cde0dec20b5aa2b9edb3 Author: Bruce Schuchardt <[email protected]> AuthorDate: Mon Apr 27 15:28:03 2020 -0700 GEODE-8021: CI Failure: CloseConnectionTest. sharedSenderShouldRecoverFromClosedSocket fixing a marginally flaky test - ensure no bleed-through from other tests in ConnectionTable's ThreadLocal, which would cause getConnection to return the wrong sort of Connection - since Connections are multi-threaded and the state we're looking for is set by a background thread, use GeodeAwaitility to wait for the condition to be set. --- .../java/org/apache/geode/internal/tcp/CloseConnectionTest.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/geode-core/src/distributedTest/java/org/apache/geode/internal/tcp/CloseConnectionTest.java b/geode-core/src/distributedTest/java/org/apache/geode/internal/tcp/CloseConnectionTest.java index 8cc284b..78a5153 100644 --- a/geode-core/src/distributedTest/java/org/apache/geode/internal/tcp/CloseConnectionTest.java +++ b/geode-core/src/distributedTest/java/org/apache/geode/internal/tcp/CloseConnectionTest.java @@ -106,7 +106,12 @@ public class CloseConnectionTest implements Serializable { .getOtherNormalDistributionManagerIds().iterator().next(); Connection connection = conTable.getConduit().getConnection(otherMember, true, false, System.currentTimeMillis(), 15000, 0); - assertThat(connection.hasResidualReaderThread()).isTrue(); + await().untilAsserted(() -> { + // grab the shared, ordered "sender" connection to vm0. It should have a residual + // reader thread that exists to detect that the socket has been closed. + ConnectionTable.threadWantsSharedResources(); + assertThat(connection.hasResidualReaderThread()).isTrue(); + }); }); }
