You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by je...@apache.org on 2021/05/28 20:06:21 UTC
[geode] branch develop updated: GEODE-9252: Improve startup of
NativeRedisClusterTestRule (#6538)
This is an automated email from the ASF dual-hosted git repository.
jensdeppe pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/develop by this push:
new d0a6304 GEODE-9252: Improve startup of NativeRedisClusterTestRule (#6538)
d0a6304 is described below
commit d0a63049d2d66c76b6eff8faa1d375b7379ea2d2
Author: Jens Deppe <jd...@pivotal.io>
AuthorDate: Fri May 28 13:04:55 2021 -0700
GEODE-9252: Improve startup of NativeRedisClusterTestRule (#6538)
- Sometimes the docker cluster startup appears to complete but cluster
nodes reports fewer than expected primaries.
---
.../java/org/apache/geode/redis/NativeRedisClusterTestRule.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/geode-apis-compatible-with-redis/src/commonTest/java/org/apache/geode/redis/NativeRedisClusterTestRule.java b/geode-apis-compatible-with-redis/src/commonTest/java/org/apache/geode/redis/NativeRedisClusterTestRule.java
index 9b029fe..348a800 100644
--- a/geode-apis-compatible-with-redis/src/commonTest/java/org/apache/geode/redis/NativeRedisClusterTestRule.java
+++ b/geode-apis-compatible-with-redis/src/commonTest/java/org/apache/geode/redis/NativeRedisClusterTestRule.java
@@ -32,6 +32,7 @@ import org.junit.rules.RuleChain;
import org.junit.runner.Description;
import org.junit.runners.model.Statement;
import org.testcontainers.containers.DockerComposeContainer;
+import org.testcontainers.containers.wait.strategy.Wait;
import redis.clients.jedis.Jedis;
import org.apache.geode.logging.internal.log4j.api.LogService;
@@ -81,6 +82,8 @@ public class NativeRedisClusterTestRule extends ExternalResource implements Seri
// This assumes docker-compose is installed locally. Removing this line will automatically
// pull a container containing docker-compose, but it will run slower (at least on MacOS).
redisCluster.withLocalCompose(true);
+ redisCluster.waitingFor("redis-cluster-init_1",
+ Wait.forLogMessage(".*Ready to accept connections.*", 1));
redisCluster.start();