Skip to content

test(e2e): fix propagation race in background-health short-stale-window case#795

Merged
jarvis9443 merged 1 commit into
mainfrom
fix/background-health-e2e-propagation-race
Jul 21, 2026
Merged

test(e2e): fix propagation race in background-health short-stale-window case#795
jarvis9443 merged 1 commit into
mainfrom
fix/background-health-e2e-propagation-race

Conversation

@jarvis9443

Copy link
Copy Markdown
Contributor

The short-stale-window case reads /admin/v1/models/status immediately after seeding the model and asserts the row exists. Config propagation is asynchronous, so on a loaded CI runner the immediate read races the snapshot refresh and fails with expected undefined to be truthy — hit on an unrelated PR's e2e run (#794's e2e (vitest) + coverage job, where the only delta was a cargo fmt commit).

Fix: poll for the row via waitConfigPropagation, exactly like the unhealthy-transition check a few lines below already does. The scenario is unchanged — the row must appear and then go unhealthy; only the eager, un-waited existence assert is gone.

Verified locally: the file's 2 tests pass; the fix only touches the racy setup assert.

…asserting eagerly

The short-stale-window case read /admin/v1/models/status immediately
after seeding the model and asserted the row exists. Config propagation
is asynchronous, so on a loaded CI runner the immediate read races the
snapshot refresh and fails with 'expected undefined to be truthy'
(seen on the aisix#794 run; the test is otherwise unrelated to that
PR). Poll via waitConfigPropagation like the unhealthy-transition check
right below already does - same scenario, no eager race.
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 37 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ffc42dd7-6286-42ad-bc71-47d8b34d3300

📥 Commits

Reviewing files that changed from the base of the PR and between 9e2d9fa and 03cb8de.

📒 Files selected for processing (1)
  • tests/e2e/src/cases/background-health-e2e.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/background-health-e2e-propagation-race

Comment @coderabbitai help to get the list of available commands.

@jarvis9443

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@jarvis9443
jarvis9443 merged commit 7295ff9 into main Jul 21, 2026
8 of 9 checks passed
@jarvis9443
jarvis9443 deleted the fix/background-health-e2e-propagation-race branch July 21, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant