fix(egress): replace reruns with sleep in credential injection tests#1019
fix(egress): replace reruns with sleep in credential injection tests#1019averevki wants to merge 1 commit into
Conversation
Signed-off-by: averevki <sandyverevkin@gmail.com>
📝 WalkthroughWalkthroughThe credential-injection test modules now wait for policy enforcement and no longer use flaky retry markers. One module adds an autouse delay fixture, while the destination-specific module adds the delay to its existing fixture. ChangesCredential injection test synchronisation
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
testsuite/tests/singlecluster/egress/credentials_injection/test_credential_injection.py (1)
171-176: 🩺 Stability & Availability | 🔵 Trivial | 🏗️ Heavy liftUse condition-based enforcement synchronisation in both modules.
A fixed ten-second delay can still race on slow clusters and wastes time on fast clusters. Replace it with bounded polling of a concrete enforcement signal where possible.
testsuite/tests/singlecluster/egress/credentials_injection/test_credential_injection.py#L171-L176: replace the autousesleep(10)fixture with condition-based polling.testsuite/tests/singlecluster/egress/credentials_injection/test_credential_injection_by_destination.py#L185-L185: apply the same bounded enforcement wait after both policies report ready.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@testsuite/tests/singlecluster/egress/credentials_injection/test_credential_injection.py` around lines 171 - 176, Replace the fixed sleep in the autouse commit fixture of test_credential_injection.py with bounded polling for a concrete policy-enforcement signal. Apply the same condition-based enforcement wait in test_credential_injection_by_destination.py after both policies report ready; update both specified sites and preserve bounded timeout behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In
`@testsuite/tests/singlecluster/egress/credentials_injection/test_credential_injection.py`:
- Around line 171-176: Replace the fixed sleep in the autouse commit fixture of
test_credential_injection.py with bounded polling for a concrete
policy-enforcement signal. Apply the same condition-based enforcement wait in
test_credential_injection_by_destination.py after both policies report ready;
update both specified sites and preserve bounded timeout behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 64d818b3-0234-4e2a-900b-459400800dbd
📒 Files selected for processing (2)
testsuite/tests/singlecluster/egress/credentials_injection/test_credential_injection.pytestsuite/tests/singlecluster/egress/credentials_injection/test_credential_injection_by_destination.py
|
@averevki I would suggest closing this PR, as the actual cause of the nightly failure was likely that the security quotas in OpenStack had been exhausted. I checked the nightly build today, and the egress tests passed and the rerun helped them. |
|
That's good, let's follow nightly results for a couple more days to make sure the reruns is indeed enough, then I'll close this PR as not needed 👍 |
Description
Reruns on this test break nightly runs for some reason. Replacing reruns with the small sleep
Summary by CodeRabbit
Bug Fixes
Tests