This is an automated email from the ASF dual-hosted git repository. boglesby pushed a commit to branch support/1.14 in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/support/1.14 by this push: new aecbdb2 GEODE-9528: Updated test to await until asserted (#6798) aecbdb2 is described below commit aecbdb2d327cb4dfdf27e669092c7889414a7e7f Author: Barry Oglesby <bogle...@users.noreply.github.com> AuthorDate: Wed Aug 25 10:38:30 2021 -1000 GEODE-9528: Updated test to await until asserted (#6798) (cherry picked from commit ed816c55406131b95d4db8571558ed1fcecc53e7) --- .../distributed/internal/DistributionAdvisorIntegrationTest.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/geode-core/src/integrationTest/java/org/apache/geode/distributed/internal/DistributionAdvisorIntegrationTest.java b/geode-core/src/integrationTest/java/org/apache/geode/distributed/internal/DistributionAdvisorIntegrationTest.java index e04ddf4..6f88006 100644 --- a/geode-core/src/integrationTest/java/org/apache/geode/distributed/internal/DistributionAdvisorIntegrationTest.java +++ b/geode-core/src/integrationTest/java/org/apache/geode/distributed/internal/DistributionAdvisorIntegrationTest.java @@ -16,6 +16,7 @@ package org.apache.geode.distributed.internal; import static org.apache.geode.distributed.ConfigurationProperties.DISABLE_AUTO_RECONNECT; +import static org.apache.geode.test.awaitility.GeodeAwaitility.await; import static org.assertj.core.api.Assertions.assertThat; import org.junit.Rule; @@ -29,7 +30,8 @@ public class DistributionAdvisorIntegrationTest { @Rule // The embedded locator causes a ClusterDistributionManager to be created rather than a - // LonerDistributionManager which is necessary for this test + // LonerDistributionManager which is necessary for this test. Disabling auto-reconnect prevents + // the DistributedSystem from being recreated and causing issues with repeatIntegrationTest public ServerStarterRule server = new ServerStarterRule().withProperty(DISABLE_AUTO_RECONNECT, "true").withNoCacheServer() .withEmbeddedLocator().withAutoStart(); @@ -54,6 +56,7 @@ public class DistributionAdvisorIntegrationTest { server.forceDisconnectMember(); // Verify the MembershipListener is removed from the DistributionManager - assertThat(manager.getMembershipListeners().contains(listener)).isFalse(); + await().untilAsserted( + () -> assertThat(manager.getMembershipListeners().contains(listener)).isFalse()); } }