Files
Jian Zhu 80ac13ce32 fix: remove flaky time.Sleep from hub timeout controller test (#1388)
The TestHubTimeoutController_Sync test was failing intermittently in CI
due to timing issues with time.Sleep() and real-time execution overhead.

Changes:
- Removed time.Sleep() dependency that caused flakiness
- Set lease renew time in the past using time.Now().Add(-duration)
  to deterministically simulate aged leases
- Made timeout threshold configurable per test case
- Increased safety margin from 2s to 3s in "not timeout" case
  (2s lease age vs 5s timeout, previously 1s wait vs 3s timeout)
- Set startTime in the past to bypass the 10s grace period check
  that was added to handle stale lease scenarios

This eliminates race conditions in CI environments where execution
overhead could push the test beyond the timeout threshold.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: zhujian <jiazhu@redhat.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-13 02:18:37 +00:00
..
2025-09-11 07:26:59 +00:00
2026-01-27 10:26:32 +00:00
2025-09-11 07:26:59 +00:00