fix: replace fixed sleep with polling in notification test assertions
Summary
This MR fixes the flaky test TestGitlabAPI_RenameRepository_WithBaseRepository/dry_run_param_not_set_means_implicit_false by replacing the fixed 50ms time.Sleep() with a polling-based approach using require.Eventually().
The test was failing intermittently due to a race condition between asynchronous webhook notification delivery and the test's event assertion logic. The hardcoded 50ms delay was insufficient in database load balancing scenarios where:
- WAL replication delays occur between primary and replicas
- Service discovery DNS resolution adds latency
- Connection pool management introduces overhead
- CI environment resources vary unpredictably
This MR replaces the fixed delay with require.Eventually().
Closes #1787 (closed)
Checklist
- Code follows repository patterns and conventions
- All functions are fully implemented with no TODOs
- Proper error handling and validation
- Comments added for key functions
- Conventional commit message format
Edited by Pawel Rozlach