Repository navigation
[wrangler] Make worker deletion in e2e test cleanup best-effort - #12832
Merged
Merged
Conversation
|
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
wrangler
commit: |
petebacondarwin
marked this pull request as ready for review
March 10, 2026 16:14
Contributor
|
Codeowners approval required for this PR:
Show detailed file reviewers |
emily-shen
approved these changes
Mar 10, 2026
edmundhung
approved these changes
Mar 10, 2026
Worker deletion in afterEach/afterAll hooks can hang when the backend flakes or responds slowly, causing test hook timeouts that mask real test failures. Add a bestEffortRun() helper that uses a short timeout (5s) and swallows errors, then use it for all wrangler delete calls in cleanup hooks so the test suite moves on quickly instead of stalling.
petebacondarwin
force-pushed
the
best-effort-worker-deletion-e2e
branch
from
March 10, 2026 17:07
af8be84 to
4085e7b
Compare
Contributor
|
Codeowners approval required for this PR:
Show detailed file reviewers |
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.
Worker deletion in
afterEach/afterAllhooks can hang when the Cloudflare backend flakes or responds slowly. Sincehelper.run()usesspawnSyncwith a 50-second default timeout, a single stalled cleanup can block for up to 50 seconds — and multiple sequential cleanups compound to minutes. This causes test hook timeouts that mask real test failures.Changes:
bestEffortRun()method toWranglerE2ETestHelperthat passes a 5-second timeout tospawnSyncand swallows errors (logging a warning instead of throwing)bestEffortRun()for allwrangler deletecalls in cleanup hooks acrossdeploy.test.ts,deployments.test.ts,provision.test.ts, and theworker()helper method