Skip to content

Commit

Permalink
Merge pull request #452 from Ladicek/workaround-for-sentinel-bug
Browse files Browse the repository at this point in the history
workaround a bug in the Grokzen Docker image
  • Loading branch information
Ladicek authored Jul 11, 2024
2 parents 9e89894 + 5e4ff2b commit 6730109
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ public class RedisClusterTest {
// sentinel ports (5000-5002) 3x (match the cluster master nodes)
.withFixedExposedPort(5000, 5000)
.withFixedExposedPort(5001, 5001)
.withFixedExposedPort(5002, 5002);
.withFixedExposedPort(5002, 5002)
// workaround for new version of the Docker image that doesn't use the built `redis-sentinel` binary correctly
.withCommand("/bin/bash", "-c", "sed -i -e 's|redis-sentinel|/redis/src/redis-sentinel|g' /docker-entrypoint.sh && exec /docker-entrypoint.sh redis-cluster");


@Rule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ public class RedisReplicationTest {
// sentinel ports (5000-5002) 3x (match the cluster master nodes)
.withFixedExposedPort(5000, 5000)
.withFixedExposedPort(5001, 5001)
.withFixedExposedPort(5002, 5002);
.withFixedExposedPort(5002, 5002)
// workaround for new version of the Docker image that doesn't use the built `redis-sentinel` binary correctly
.withCommand("/bin/bash", "-c", "sed -i -e 's|redis-sentinel|/redis/src/redis-sentinel|g' /docker-entrypoint.sh && exec /docker-entrypoint.sh redis-cluster");

@Rule
public final RunTestOnContext rule = new RunTestOnContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ public class RedisSentinelTest {
// sentinel ports (5000-5002) 3x (match the cluster master nodes)
.withFixedExposedPort(5000, 5000)
.withFixedExposedPort(5001, 5001)
.withFixedExposedPort(5002, 5002);
.withFixedExposedPort(5002, 5002)
// workaround for new version of the Docker image that doesn't use the built `redis-sentinel` binary correctly
.withCommand("/bin/bash", "-c", "sed -i -e 's|redis-sentinel|/redis/src/redis-sentinel|g' /docker-entrypoint.sh && exec /docker-entrypoint.sh redis-cluster");

@Rule
public final RunTestOnContext rule = new RunTestOnContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ public class RedisSentinelWithDBTest {
// sentinel ports (5000-5002) 3x (match the cluster master nodes)
.withFixedExposedPort(5000, 5000)
.withFixedExposedPort(5001, 5001)
.withFixedExposedPort(5002, 5002);
.withFixedExposedPort(5002, 5002)
// workaround for new version of the Docker image that doesn't use the built `redis-sentinel` binary correctly
.withCommand("/bin/bash", "-c", "sed -i -e 's|redis-sentinel|/redis/src/redis-sentinel|g' /docker-entrypoint.sh && exec /docker-entrypoint.sh redis-cluster");

@Rule
public final RunTestOnContext rule = new RunTestOnContext();
Expand Down
4 changes: 3 additions & 1 deletion src/test/java/io/vertx/test/redis/RedisPubSubTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ public class RedisPubSubTest {
// sentinel ports (5000-5002) 3x (match the cluster master nodes)
.withFixedExposedPort(5000, 5000)
.withFixedExposedPort(5001, 5001)
.withFixedExposedPort(5002, 5002);
.withFixedExposedPort(5002, 5002)
// workaround for new version of the Docker image that doesn't use the built `redis-sentinel` binary correctly
.withCommand("/bin/bash", "-c", "sed -i -e 's|redis-sentinel|/redis/src/redis-sentinel|g' /docker-entrypoint.sh && exec /docker-entrypoint.sh redis-cluster");

@Rule
public final RunTestOnContext rule = new RunTestOnContext(new VertxOptions().setEventLoopPoolSize(1));
Expand Down

0 comments on commit 6730109

Please sign in to comment.