test(e2e): size MR and token-rotation budgets above their nested waits - #276
test(e2e): size MR and token-rotation budgets above their nested waits#276jmrplens wants to merge 1 commit into
Conversation
Three CE tests failed against the Docker GitLab because their context budget was smaller than the sum of the waits nested inside it, so the context expired mid-poll instead of letting the assertion run: - TestIndividual_MRRawDiffs: 180s budget vs ~20s setup + 120s waitForMRReady + 60s raw-diff poll. waitForMRReady only logs when it times out, precisely so the following poll still gets its chance, which an exactly-sized budget denies. Now 300s (600s enterprise); measured 173s on a green run. - TestMeta_MRReviewChanges: 180s budget vs ~30s setup + 120s waitForMRReady + 120s diff-version deadline in DiffVersionsList. Now 360s (720s enterprise); the subtest measured 159s. - TestIndividual_ProjectAccessTokenRotateSelf: the self-rotate 404 propagation window was observed exceeding two minutes under load, outlasting the 8 retries. Now 12 retries within a 300s budget; measured 249s against the previous 240s budget. Only the waits changed; every assertion is unchanged. Verified with a full make test-e2e-docker run: 1445 tests, 17 skipped, 0 failures.
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdjusts e2e test context timeouts and retry budgets so that parent test contexts outlast their nested waits, preventing premature context expiration during MR readiness and token rotation polling. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe E2E tests now use longer timeout and retry windows for access-token rotation and merge request readiness and diff polling. ChangesE2E timeout budget updates
Estimated code review effort: 1 (Trivial) | ~5 minutes Mergeability Score: ⚪ Minimal · up to This PR only adjusts end-to-end test timeout and retry budgets without changing assertions or production behavior; no actionable merge-blocking risk remains after normal checks and review. Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Summary
Fixes three CE e2e tests whose context budget was smaller than the sum of the waits nested inside it, so the context expired mid-poll instead of letting the assertion run. Found while validating
make test-e2e-dockerbefore tagging 2.6.3.This is a pre-existing test-infrastructure bug, not a regression: the failure mode is a timeout waiting on GitLab's own async processing, and none of the recent dependency updates touch MR diffs or token rotation.
The arithmetic
TestIndividual_MRRawDiffswaitForMRReady+ 60s raw-diff poll = 200sTestMeta_MRReviewChangeswaitForMRReady+ 120s diff-version deadline = 270sTestIndividual_ProjectAccessTokenRotateSelfwaitForMRReadyonly logs when it times out — by design, so the following poll still gets its chance. An exactly-sized parent budget denies it that chance, which is whyMRRawDiffsfailed deterministically at ~181s on two consecutive full-suite runs.New budgets: 300s / 360s (600s / 720s enterprise), and 12 retries for the token rotation. Every measured duration above exceeded its old budget, so these are the sizes the tests actually need — not padding.
Scope
Only the waits changed. No assertion was modified, relaxed, or removed.
Verification
Full
make test-e2e-dockeragainst an ephemeral GitLab CE + runner:JUnit report:
tests=1445 failures=0 errors=0 skipped=17. The two prior runs on the same code (before this fix) reported 4 and 1 failures respectively.go test -tags e2e -ccompiles andgolangci-lint run --build-tags e2e ./test/e2e/suite/is clean.Summary by CodeRabbit