This is an automated email from the ASF dual-hosted git repository.
boglesby pushed a commit to branch support/1.12
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/support/1.12 by this push:
new 1c00000 GEODE-9528: Updated test to await until asserted (#6798)
1c00000 is described below
commit 1c0000043ff51a6c5eb77b0a83b10b83e071aad0
Author: Barry Oglesby <[email protected]>
AuthorDate: Wed Aug 25 10:38:30 2021 -1000
GEODE-9528: Updated test to await until asserted (#6798)
(cherry picked from commit ed816c55406131b95d4db8571558ed1fcecc53e7)
(cherry picked from commit aecbdb2d327cb4dfdf27e669092c7889414a7e7f)
(cherry picked from commit fa1f753b38c8b8a1985b712751411e94654ca49e)
---
.../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());
}
}