Skip to content

Commit

Permalink
test: increase timeouts to reduce flakiness on Windows CI (cloudflare…
Browse files Browse the repository at this point in the history
  • Loading branch information
petebacondarwin authored Jun 22, 2023
1 parent c5f3bf4 commit a74477f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"selfsigned",
"textfile",
"tsbuildinfo",
"turborepo",
"undici",
"unrevoke",
"Untriaged",
Expand Down
2 changes: 1 addition & 1 deletion packages/wrangler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"<rootDir>/src/__tests__/jest.setup.ts"
],
"testRegex": "src/__tests__/.*\\.(test|spec)\\.[jt]sx?$",
"testTimeout": 30000,
"testTimeout": 50000,
"transform": {
"^.+\\.c?(t|j)sx?$": [
"esbuild-jest",
Expand Down
13 changes: 10 additions & 3 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@ import { defineConfig } from "vitest/config";
// This default gets pulled in by all the Vitest runs in the monorepo.
export default defineConfig({
test: {
testTimeout: 30_000,
hookTimeout: 30_000,
teardownTimeout: 30_000,
// These timeouts are very large because the Windows CI jobs regularly take up ot 42 secs.
// Ideally we should not have such high defaults across all tests, but instead be able to
// increase timeouts for certain sets of tests.
// But this might need some vitest/turborepo magical incantations and bumping the values
// here is a simpler short term fix.
// Note that this will not cause tests to pass that should fail. It just means that hanging
// tests will take longer to fail than they would before.
testTimeout: 50_000,
hookTimeout: 50_000,
teardownTimeout: 50_000,
useAtomics: true,
},
});

0 comments on commit a74477f

Please sign in to comment.