Commit a620346
committed
fix(tests): add Redis availability check to performance tests
Performance benchmark tests were attempting to connect to Redis
even when REDIS_AVAILABLE environment variable was not set.
Problem:
- Tests had @group redis annotation for CI exclusion
- No runtime check prevented Redis connection attempts
- Running `vendor/bin/pest` locally without Redis caused 6 failures
- Tests: 6 failed, 3 skipped, 118 passed → connection refused errors
Solution:
- Add beforeEach() hook to check REDIS_AVAILABLE env var
- Skip all 6 performance tests when Redis is not available
- Matches pattern used in EventListenersTest
Result:
- Tests: 9 skipped, 118 passed (0 failed) ✅
- No Redis connection errors when running locally
- Performance tests properly skip: "Requires Redis - run with redis group"
- CI remains unchanged (already excludes redis group)1 parent 4d552d4 commit a620346
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
13 | 19 | | |
14 | 20 | | |
15 | 21 | | |
| |||
0 commit comments