Skip to content

Commit 6730109

Browse files
authored
Merge pull request #452 from Ladicek/workaround-for-sentinel-bug
workaround a bug in the Grokzen Docker image
2 parents 9e89894 + 5e4ff2b commit 6730109

File tree

5 files changed

+15
-5
lines changed

5 files changed

+15
-5
lines changed

src/test/java/io/vertx/redis/client/test/RedisClusterTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ public class RedisClusterTest {
4646
// sentinel ports (5000-5002) 3x (match the cluster master nodes)
4747
.withFixedExposedPort(5000, 5000)
4848
.withFixedExposedPort(5001, 5001)
49-
.withFixedExposedPort(5002, 5002);
49+
.withFixedExposedPort(5002, 5002)
50+
// workaround for new version of the Docker image that doesn't use the built `redis-sentinel` binary correctly
51+
.withCommand("/bin/bash", "-c", "sed -i -e 's|redis-sentinel|/redis/src/redis-sentinel|g' /docker-entrypoint.sh && exec /docker-entrypoint.sh redis-cluster");
5052

5153

5254
@Rule

src/test/java/io/vertx/redis/client/test/RedisReplicationTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ public class RedisReplicationTest {
3939
// sentinel ports (5000-5002) 3x (match the cluster master nodes)
4040
.withFixedExposedPort(5000, 5000)
4141
.withFixedExposedPort(5001, 5001)
42-
.withFixedExposedPort(5002, 5002);
42+
.withFixedExposedPort(5002, 5002)
43+
// workaround for new version of the Docker image that doesn't use the built `redis-sentinel` binary correctly
44+
.withCommand("/bin/bash", "-c", "sed -i -e 's|redis-sentinel|/redis/src/redis-sentinel|g' /docker-entrypoint.sh && exec /docker-entrypoint.sh redis-cluster");
4345

4446
@Rule
4547
public final RunTestOnContext rule = new RunTestOnContext();

src/test/java/io/vertx/redis/client/test/RedisSentinelTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ public class RedisSentinelTest {
3434
// sentinel ports (5000-5002) 3x (match the cluster master nodes)
3535
.withFixedExposedPort(5000, 5000)
3636
.withFixedExposedPort(5001, 5001)
37-
.withFixedExposedPort(5002, 5002);
37+
.withFixedExposedPort(5002, 5002)
38+
// workaround for new version of the Docker image that doesn't use the built `redis-sentinel` binary correctly
39+
.withCommand("/bin/bash", "-c", "sed -i -e 's|redis-sentinel|/redis/src/redis-sentinel|g' /docker-entrypoint.sh && exec /docker-entrypoint.sh redis-cluster");
3840

3941
@Rule
4042
public final RunTestOnContext rule = new RunTestOnContext();

src/test/java/io/vertx/redis/client/test/RedisSentinelWithDBTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ public class RedisSentinelWithDBTest {
3434
// sentinel ports (5000-5002) 3x (match the cluster master nodes)
3535
.withFixedExposedPort(5000, 5000)
3636
.withFixedExposedPort(5001, 5001)
37-
.withFixedExposedPort(5002, 5002);
37+
.withFixedExposedPort(5002, 5002)
38+
// workaround for new version of the Docker image that doesn't use the built `redis-sentinel` binary correctly
39+
.withCommand("/bin/bash", "-c", "sed -i -e 's|redis-sentinel|/redis/src/redis-sentinel|g' /docker-entrypoint.sh && exec /docker-entrypoint.sh redis-cluster");
3840

3941
@Rule
4042
public final RunTestOnContext rule = new RunTestOnContext();

src/test/java/io/vertx/test/redis/RedisPubSubTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ public class RedisPubSubTest {
3333
// sentinel ports (5000-5002) 3x (match the cluster master nodes)
3434
.withFixedExposedPort(5000, 5000)
3535
.withFixedExposedPort(5001, 5001)
36-
.withFixedExposedPort(5002, 5002);
36+
.withFixedExposedPort(5002, 5002)
37+
// workaround for new version of the Docker image that doesn't use the built `redis-sentinel` binary correctly
38+
.withCommand("/bin/bash", "-c", "sed -i -e 's|redis-sentinel|/redis/src/redis-sentinel|g' /docker-entrypoint.sh && exec /docker-entrypoint.sh redis-cluster");
3739

3840
@Rule
3941
public final RunTestOnContext rule = new RunTestOnContext(new VertxOptions().setEventLoopPoolSize(1));

0 commit comments

Comments
 (0)