Fix send-integration e2e flake: teardown budget asymmetry (10s afterAll vs 120s beforeAll) - #1302
Merged
Merged
Conversation
…ch beforeAll The suite's afterAll declared an explicit 10s budget, overriding the config's 300s hookTimeout, while beforeAll gets 120s — an unintentional asymmetry. The teardown does two deactivate fetches + stopServer's SIGTERM wait + 3 rmSync, which exceeds 10s on a loaded CI runner, failing the whole suite after all 5 tests pass. Hit PRs #1283, #1290, and #1301 across two days. Raise the budget to 120s and bound the two deactivate fetches with AbortSignal.timeout(10s) so a hung Tower can't eat the enlarged budget either.
Contributor
Author
|
Additional evidence from PR #1301's branch (air-1288 builder's tally): the send-integration teardown failed 3 of 4 first-attempt CI runs on that branch alone, passing on both re-runs. That hit rate is well past 'occasional flake' on loaded runners and supports the full fix (budget parity with beforeAll + bounded fetches) over a smaller bump. |
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.
Problem
send-integration.e2e.test.tsfails intermittently in the Tower Integration Tests CI job withError: Hook timed out in 10000ms— after all 5 tests pass. It has hit three PRs in two days (#1283, #1290, #1301) plus multiple earlier branches, each time requiring a manual rerun.Root cause
(Credit: the air-1288 builder's diagnosis on PR #1301.) The suite's
afterAlldeclares an explicit10_000ms budget, overriding the config's 300shookTimeout, whilebeforeAllin the same suite gets120_000— an unintentional asymmetry. The teardown performs two unbounded deactivate fetches,stopServer's 2s SIGTERM wait, and threermSynccalls; on a loaded ubuntu runner that exceeds 10s.Fix
afterAllbudget to120_000, matchingbeforeAll.AbortSignal.timeout(10_000)so a hung Tower can't consume the enlarged budget either — the teardown still completes and the existing.catch(() => {})handles the abort.Testing
Suite passes locally under the e2e config: 5/5 in 1.8s. No production code touched — one test file, +6/−3.
🤖 Generated with Claude Code