Skip to content

test(cloudflare): Unflake integration test#20208

Open
JPeer264 wants to merge 1 commit intodevelopfrom
jp/unflake-cf-integration
Open

test(cloudflare): Unflake integration test#20208
JPeer264 wants to merge 1 commit intodevelopfrom
jp/unflake-cf-integration

Conversation

@JPeer264
Copy link
Copy Markdown
Member

There was one flaky test, which got me a little deeper into the runner.ts logic. This test was only passing when it was running / finishing first. With the shuffle flag it was consistently failing, this is why this is added in this PR as well.

Furthermore a random port will be created for each runner by setting --port 0, this just makes sure that when running wrangler dev in another tab, while running the tests, the local development has the default :8787 port.

@JPeer264 JPeer264 requested review from nicohrubec and s1gr1d April 10, 2026 13:53
@JPeer264 JPeer264 self-assigned this Apr 10, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

Core

  • Add enableTruncation option to Google GenAI integration by andreiborza in #20184
  • Add enableTruncation option to Anthropic AI integration by andreiborza in #20181
  • Add enableTruncation option to LangGraph integration by andreiborza in #20183
  • Add enableTruncation option to LangChain integration by andreiborza in #20182
  • Add enableTruncation option to OpenAI integration by andreiborza in #20167
  • Export a reusable function to add tracing headers by JPeer264 in #20076

Deps

  • Bump axios from 1.13.5 to 1.15.0 by dependabot in #20180
  • Bump hono from 4.12.7 to 4.12.12 by dependabot in #20118
  • Bump defu from 6.1.4 to 6.1.6 by dependabot in #20104

Other

  • (cloudflare) Propagate traceparent to RPC calls - via fetch by JPeer264 in #19991

Bug Fixes 🐛

  • (deno) Avoid inferring invalid span op from Deno tracer by Lms24 in #20128
  • (e2e) Add op check to waitForTransaction in React Router e2e tests by copilot-swe-agent in #20193

Internal Changes 🔧

Deps

  • Bump hono from 4.12.7 to 4.12.12 in /dev-packages/e2e-tests/test-applications/cloudflare-hono by dependabot in #20119
  • Bump axios from 1.13.5 to 1.15.0 in /dev-packages/e2e-tests/test-applications/nestjs-basic by dependabot in #20179

Other

  • (bugbot) Add rules to flag test-flake-provoking patterns by Lms24 in #20192
  • (cloudflare) Unflake integration test by JPeer264 in #20208
  • (deps-dev) Bump vite from 7.2.0 to 7.3.2 in /dev-packages/e2e-tests/test-applications/tanstackstart-react by dependabot in #20107
  • (size-limit) Bump failing size limit scenario by Lms24 in #20186

🤖 This preview updates automatically when you update the PR.

// This is needed because wrangler dev may not guarantee waitUntil completion
// the same way production Cloudflare does. Without this delay, the last
// envelope's HTTP request may not complete before the test moves on.
const delay = () => new Promise(resolve => setTimeout(resolve, 50));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

m: can we solve this differently, specifically is there some event that we could await before moving onto the next request instead of adding a timeout? this might already help but I am worried that this will not fully resolve the flakiness

@Lms24
Copy link
Copy Markdown
Member

Lms24 commented Apr 10, 2026

any chance this resolves #20209?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants