Skip to content

More streams test consolidation and gap filling - #7177

Open
jasnell wants to merge 3 commits into
jasnell/streams-test-consolidation-6from
jasnell/streams-test-consolidation-7
Open

More streams test consolidation and gap filling#7177
jasnell wants to merge 3 commits into
jasnell/streams-test-consolidation-6from
jasnell/streams-test-consolidation-7

Conversation

@jasnell

@jasnell jasnell commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@jasnell
jasnell requested review from a team as code owners August 28, 2026 22:34
return new Response(ts10.readable);
}

if (url.pathname.startsWith('/pool/')) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Promise.all() starts the fetches but does not require their handlers to overlap: these streams were already filled and closed during module evaluation, so serial request handling produces the same response text. Gate the handlers until all four requests have arrived, so a regression that serializes this path cannot pass the test.

Suggested change
if (url.pathname.startsWith('/pool/')) {
if (url.pathname.startsWith('/pool/')) {
const i = Number(url.pathname.split('/')[2]);
const state = (globalThis.poolRequestBarrier ??= (() => {
let release;
return {
entered: 0,
wait: new Promise((resolve) => {
release = resolve;
}),
release: () => release(),
};
})());
if (++state.entered === streamPool.length) state.release();
await state.wait;
return new Response(streamPool[i]);
}

@ask-bonk

ask-bonk Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

I'm Bonk, and I've done a quick review of your PR.

Adds stream transfer/clone, IoContext concurrency, piping, and writable queue-accounting coverage.

  1. P2 src/tests/streams/iocontext/global-scope-streams.js:384: The concurrency test permits serialized request handling. Posted one inline suggestion to gate all four handlers.

Time for a pun! That concurrency test needs a little more stream team.

github run

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.

1 participant