Repository navigation
test(e2e): Fix flaky hono, Next.js T3, and React Router tests - #26482
Merged
Merged
Conversation
The error routes answer without `Content-Length`, so the SDK treats the response as a stream and ends the segment span after the middleware span. On Cloudflare, the flush of another invocation can send the middleware span alone, and the two envelopes arrive in any order. The tests waited for the segment only. They now wait for the middleware span too.
`next dev` compiles a route on its first request. On CI, the compile of `/` and of the tRPC route took about 30.3 s, and the test timeout is 30 s. A global setup now requests both routes before the tests start.
… route The route held the first request on a promise that only the second request resolved. workerd cancels a request that waits with no pending I/O, and a promise must not be resolved from another request. The first request now polls on a timer until the second one has arrived.
Contributor
size-limit report 📦Compared: e6afdd6 (PR test merge using develop at 0928874) Against: 72add88 (develop) · base run #66483
|
…ld span On Cloudflare, a child span can arrive after its segment span. A test that checks a child span can now pass a third argument, and the helper waits for that span too. The hono error tests use it.
s1gr1d
marked this pull request as ready for review
November 17, 2026 14:11
javascript-sdk-gitflow
Bot
requested review from
chargome,
nicohrubec and
timfish
November 17, 2026 14:11
nicohrubec
approved these changes
Nov 17, 2026
Contributor
Optional E2E testsSome optional checks were not successful. They do not block the merge. 2 not successful, 61 successful. See the run.
Successful checks
|
chargome
approved these changes
Nov 17, 2026
51 tasks done
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.
What
hono-4andhono-4-legacy: the tests for an error in a middleware wait until the middleware span has arrived, before they check it. For this,collectStreamedSpansUntilSegmentcan now also wait for a child span.nextjs-15-t3: the pages are loaded once before the first test, so the first test does not wait for the dev server to compile them.react-router-8-framework: the isolation test route no longer hangs on Cloudflare.Why
These three tests failed in CI from time to time, and the SDK was not the cause. The tests checked data too early, or ran into a time limit.
Ref #26477