Skip to content

Commit e1b1bb5

Browse files
jasnelladuh95
authored andcommitted
quic: improve recv coalescing test sizes
Signed-off-by: James M Snell <jasnell@gmail.com> Assisted-by: Opencode:Opus 4.6 PR-URL: #63267 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent 25a416f commit e1b1bb5

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

‎test/parallel/test-quic-stream-recv-coalescing.mjs‎

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,17 @@ if (!hasQuic) {
1717
const{ listen, connect }=awaitimport('../common/quic.mjs');
1818
const{drainableProtocol: dp}=awaitimport('stream/iter');
1919

20-
// Payloads of varying sizes. Exercises different coalescing paths:
21-
// Small (below frame size), medium (a few frames), large (many frames).
20+
// Payloads of varying sizes with diverse prime factors to exercise
21+
// different flow control boundary alignments. Avoids round multiples
22+
// of 1000 so that frame boundaries, accumulation buffer thresholds,
23+
// and flow control windows are hit at irregular offsets.
2224
constpayloadSizes=[
23-
100,// Small: fits in a single frame
24-
5_000,// Medium: a few frames
25-
64_000,// Large: triggers buffer-full flush
26-
1_000,// Small again after large
27-
200_000,// Very large: well beyond 64 KB buffer
28-
500,// Small tail
25+
97,// Small prime: fits in a single frame
26+
4_999,// Medium prime: a few frames
27+
65_521,// Largest prime below 64 KB buffer flush threshold
28+
1_153,// Small prime after large
29+
196_613,// Large prime: well beyond 64 KB buffer
30+
509,// Small prime tail
2931
];
3032
consttotalBytes=payloadSizes.reduce((a,b)=>a+b,0);
3133

0 commit comments

Comments
 (0)