CRITICAL BLOCKER FIX: Tests were hanging for 60+ seconds due to invalid
Redis timeout URL parameters that are silently ignored by redis v0.27.6.
Root Cause:
- redis crate v0.27.6 does NOT support connection_timeout or response_timeout
as URL parameters
- When Redis unavailable, code blocks waiting for OS-level TCP timeout (60s+)
Solution:
- Wrap async Redis operations with tokio::time::timeout()
- Test timeouts: 2s connection, 1s operations (PING/FLUSHDB)
- Production timeout: 5s connection
Files Modified:
- services/api_gateway/tests/common/mod.rs (lines 119-211)
- Fixed wait_for_redis() with tokio timeout wrappers
- Fixed cleanup_redis() with tokio timeout wrappers
- Removed broken add_redis_timeouts() function
- services/api_gateway/src/auth/jwt/revocation.rs (lines 285-316)
- Fixed JwtRevocationService::new() with tokio timeout wrapper
Closes: JWT authentication test hang blocker
Impact: Tests now fail fast (2-5s) instead of hanging for 60+ seconds