Redis Stream Coordinator
Design docs

Testing Guide

The project keeps tests split by blast radius so contributors can run the right level locally.

Fast Unit And Slice Tests

Run all JVM tests:

./gradlew test --no-daemon

Run coordinator-only tests:

./gradlew :coordinator-server:test --no-daemon

Run starter-only tests:

./gradlew :redisstream-spring-boot-starter:test --no-daemon

Full Local Verification

./gradlew test build --no-daemon
python3 .github/scripts/test_docker_distribution.py

Redis Integration Tests

Redis integration tests are disabled by default. They require an external Redis Cluster:

export AWS_REDIS_CLUSTER_NODES=3.39.42.28:6379
export AWS_REDIS_PASSWORD='your-redis-password'

Then run:

REDIS_COORDINATOR_INTEGRATION_TESTS=true ./gradlew :coordinator-server:test \
  --tests '*RedisCoordinatorStateStoreIntegrationTest' \
  --tests '*RedisStreamProvisioningIntegrationTest'

Docker Pod Smoke

Use compose.pods.yaml to run the pod topology against an external Redis Cluster:

export AWS_REDIS_CLUSTER_NODES=3.39.42.28:6379
export AWS_REDIS_PASSWORD='your-redis-password'
docker compose -f compose.pods.yaml -p rsc-pods up -d --build

The stack starts:

Check the coordinator assignment and sample pod events:

curl -u admin:password \
  http://localhost:8080/coord/v1/monitoring/streams/create-order/groups/demo-workers/assignments

curl http://localhost:18090/sample/status
curl http://localhost:18081/sample/events
curl http://localhost:18082/sample/events

Open Swagger UI to exercise the same APIs from the browser:

For the coordinator, click Authorize and use admin / password before calling protected /coord/v1/** endpoints.

Stop the stack:

docker compose -f compose.pods.yaml -p rsc-pods down

Docker Smoke Test

Build the image:

docker build -t redis-stream-coordinator/coordinator-server:local .

Run a memory-store smoke container:

docker run --rm -p 18080:8080 \
  -e COORDINATOR_STORE_TYPE=memory \
  -e REDIS_STREAM_COORDINATOR_ADMIN_PASSWORD=smoke-password \
  redis-stream-coordinator/coordinator-server:local

In another shell:

curl -u admin:smoke-password http://localhost:18080/coord/v1/monitoring/health

Test Naming

Use names that describe behavior from the operator or application developer perspective:

Prefer a small number of scenario tests around coordinator state-machine flows, backed by smaller focused tests for validation, assignment, Redis persistence, and starter callbacks.