Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ on:
schedule:
- cron: '0 1 * * *' # nightly build
workflow_dispatch:
inputs:
redis_version:
description: "Redis stack version to use for testing"
required: false
default: "8.0-M02"
type: choice
options:
- "8.0-M02"
- "rs-7.4.0-v1"
- "rs-7.2.0-v13"

jobs:

Expand Down Expand Up @@ -51,6 +61,7 @@ jobs:
run: |
make test-coverage
env:
REDIS_STACK_VERSION: ${{ inputs.redis_version || '8.0-M02' }}
JVM_OPTS: -Xmx3200m
TERM: dumb
- name: Upload coverage reports to Codecov
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ ifeq ($(REDIS),unstable)
@echo slaveof localhost 6482 >> $@
@echo replica-announce-ip localhost >> $@
else
@echo slaveof 127.0.1 6482 >> $@
@echo slaveof 127.0.0.1 6482 >> $@
endif


Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,7 @@
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<REDIS_STACK_VERSION>${env.REDIS_STACK_VERSION}</REDIS_STACK_VERSION>
<io.netty.eventLoopThreads>4</io.netty.eventLoopThreads>
</systemPropertyVariables>
<includes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,16 @@ public class RedisContainerIntegrationTests {

private static final String REDIS_STACK_CLUSTER = "clustered-stack";

private static final String REDIS_STACK_VERSION = System.getProperty("REDIS_STACK_VERSION", "8.0-M02");;

private static Exception initializationException;

public static ComposeContainer CLUSTERED_STACK = new ComposeContainer(
new File("src/test/resources/docker/docker-compose.yml")).withExposedService(REDIS_STACK_CLUSTER, 36379)
.withExposedService(REDIS_STACK_CLUSTER, 36380).withExposedService(REDIS_STACK_CLUSTER, 36381)
.withExposedService(REDIS_STACK_CLUSTER, 36382).withExposedService(REDIS_STACK_CLUSTER, 36383)
.withExposedService(REDIS_STACK_CLUSTER, 36384).withExposedService(REDIS_STACK_STANDALONE, 6379)
.withLocalCompose(true);
.withExposedService(REDIS_STACK_STANDALONE, 6379)
.withEnv("CLIENT_LIBS_TEST_IMAGE", "redislabs/client-libs-test")
.withEnv("REDIS_STACK_VERSION", REDIS_STACK_VERSION).withPull(false).withLocalCompose(true);

// Singleton container pattern - start the containers only once
// See https://java.testcontainers.org/test_framework_integration/manual_lifecycle_control/#singleton-containers
Expand All @@ -44,8 +46,7 @@ public class RedisContainerIntegrationTests {
CLUSTERED_STACK.withLogConsumer(REDIS_STACK_CLUSTER, (OutputFrame frame) -> LOGGER.debug(frame.getUtf8String()));
CLUSTERED_STACK.withLogConsumer(REDIS_STACK_STANDALONE, (OutputFrame frame) -> LOGGER.debug(frame.getUtf8String()));

CLUSTERED_STACK.waitingFor(REDIS_STACK_CLUSTER,
Wait.forLogMessage(".*Background RDB transfer terminated with success.*", 1));
CLUSTERED_STACK.waitingFor(REDIS_STACK_CLUSTER, Wait.forLogMessage("Cluster created with nodes:.*", 1));
do {
try {
CLUSTERED_STACK.start();
Expand Down
23 changes: 0 additions & 23 deletions src/test/resources/docker/Dockerfile

This file was deleted.

7 changes: 0 additions & 7 deletions src/test/resources/docker/cluster-nodes/nodes-36379.conf

This file was deleted.

7 changes: 0 additions & 7 deletions src/test/resources/docker/cluster-nodes/nodes-36380.conf

This file was deleted.

7 changes: 0 additions & 7 deletions src/test/resources/docker/cluster-nodes/nodes-36381.conf

This file was deleted.

7 changes: 0 additions & 7 deletions src/test/resources/docker/cluster-nodes/nodes-36382.conf

This file was deleted.

7 changes: 0 additions & 7 deletions src/test/resources/docker/cluster-nodes/nodes-36383.conf

This file was deleted.

7 changes: 0 additions & 7 deletions src/test/resources/docker/cluster-nodes/nodes-36384.conf

This file was deleted.

13 changes: 0 additions & 13 deletions src/test/resources/docker/cluster-nodes/redis-36379.conf

This file was deleted.

13 changes: 0 additions & 13 deletions src/test/resources/docker/cluster-nodes/redis-36380.conf

This file was deleted.

13 changes: 0 additions & 13 deletions src/test/resources/docker/cluster-nodes/redis-36381.conf

This file was deleted.

13 changes: 0 additions & 13 deletions src/test/resources/docker/cluster-nodes/redis-36382.conf

This file was deleted.

13 changes: 0 additions & 13 deletions src/test/resources/docker/cluster-nodes/redis-36383.conf

This file was deleted.

13 changes: 0 additions & 13 deletions src/test/resources/docker/cluster-nodes/redis-36384.conf

This file was deleted.

17 changes: 9 additions & 8 deletions src/test/resources/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
services:

standalone-stack:
image: redis/redis-stack:latest
image: "${CLIENT_LIBS_TEST_IMAGE}:${REDIS_STACK_VERSION}"
environment:
- REDIS_CLUSTER=no
- PORT=6379
ports:
- "16379:6379"

clustered-stack:
image: tihomirmateev339/cae-infra:latest
image: "${CLIENT_LIBS_TEST_IMAGE}:${REDIS_STACK_VERSION}"
environment:
- REDIS_CLUSTER=yes
- PORT=36379
ports:
- "36379:36379"
- "36380:36380"
- "36381:36381"
- "36382:36382"
- "36383:36383"
- "36384:36384"
- "36379-36381:36379-36381"
31 changes: 0 additions & 31 deletions src/test/resources/docker/start_cluster.sh

This file was deleted.

Loading