-
Notifications
You must be signed in to change notification settings - Fork 0
Testing en
cuihairu edited this page Oct 20, 2025
·
1 revision
This page summarizes how to run unit/integration tests locally and in CI. See TESTING.md for full details.
./gradlew test # run unit tests in all modules
./gradlew :core:test # run a single module
./gradlew :core:test --tests "ClassNameTest" # a single test classNotes
- Unit tests must not require Redis.
- Recommended coverage (via JaCoCo): core ≥ 80%, others ≥ 70%.
# start Redis (minimal)
docker-compose -f docker-compose.minimal.yml up -d
# run integration tests only
./gradlew integrationTest
# stop containers
docker-compose -f docker-compose.minimal.yml downNotes
- Integration tests are tagged with
@Tag("integration")and are excluded fromtest. - Run one class:
./gradlew :reliability:integrationTest --tests "RedisTokenBucketRateLimiterIntegrationExample"
- Ensure Java 17 in runners (
java -version). - Prefer using Docker Compose files in repository for dependent services.
- For flaky Redis timing, allow short waits or retries in ITs; see docs/github-actions.md.