Repository navigation
test: stop scheduler tests depending on runner speed - #1330
Merged
Merged
Conversation
Four orchestration tests held a real 30-second scheduler lease across setup that is not about lease expiry, so a slow runner fenced them before the code under test ran. They now hold the lease for the whole test through a helper beside expire_lease, replacing per-chunk renewals. The platform webhook test waited a fixed ten seconds for 107 deliveries. It now fails only when the running dispatcher makes no progress for a minute; the delivered count and dispatcher assertions are unchanged. Validated locally on Linux with SQLite and PostgreSQL: the five affected test modules pass, and with injected stalls (31 s in setup, 120 ms per webhook delivery) the previous tests fail with the CI errors while these pass.
Validated locally: the five affected test modules on SQLite and PostgreSQL, clippy and fensu.
A dispatcher that keeps delivering but trickles now fails with its own message instead of reaching the job timeout. The one-minute progress bound is unchanged. Validated locally: the webhook test on SQLite and PostgreSQL, clippy and fensu.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
On the Windows runner, orchestration tests failed intermittently with
Fencedor a webhook deadline. The cause was not the code under test. Setup that is not about lease expiry held a real 30-second scheduler lease, and a fixed 10-second deadline covered 107 HTTP deliveries with durable receipts. A slow runner exceeded both.Changes
expire_lease,extend_lease_through_test, keeps the elected lease live for the test. The monitor, claims, sensor-bounds and group-admission tests use it instead of renewing per setup chunk. Lease-expiry and failover tests keep the real TTL.wait_for_webhookfails if the running dispatcher delivers nothing for 60 seconds, or after 10 minutes in total, each with its own message. It still requires every event to be delivered and the dispatcher to be running. The old deadline never asserted draining, since the 5-second poll fits inside it.Verification
renew during setup: Fenced,admit independent parents: Fenced,dispatcher drains more than one bounded page: Elapsed), and these pass. The injections were then removed.make check-ci. Independent review: pass; its naming should-fix is applied.