Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion dev-packages/cloudflare-integration-tests/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ process.on('exit', cleanupChildProcesses);

// Wrangler can report "Ready" before it can actually handle requests.
// This retries fetch on connection errors and transient 500 responses to handle this race condition.
async function fetchWithRetry(url: string, init: RequestInit, maxRetries = 10, retryDelayMs = 200): Promise<Response> {
// The budget (maxRetries * retryDelayMs) must cover the "ready-but-not-serving" window, which can be
// several seconds on a loaded CI runner — hence a generous default.
async function fetchWithRetry(url: string, init: RequestInit, maxRetries = 25, retryDelayMs = 200): Promise<Response> {
for (let attempt = 0; attempt < maxRetries; attempt++) {
try {
const res = await fetch(url, init);
Expand Down
5 changes: 4 additions & 1 deletion dev-packages/cloudflare-integration-tests/vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ export default defineConfig({
},
isolate: false,
include: ['./suites/**/test.ts'],
testTimeout: 30_000,
// Each test spawns its own `wrangler dev` (cold workerd boot) and waits for envelopes to be
// delivered — there is no internal runner timeout, so this ceiling covers cold-start + async work +
// delivery. Cold-start is slow and highly variable on CI, so give it generous headroom to de-flake.
testTimeout: 60_000,
// Ensure we can see debug output when DEBUG=true
...(process.env.DEBUG
? {
Expand Down
Loading