Skip to content

Commit a68ec45

Browse files
committed
Fix test assertion bounds on Windows
Signed-off-by: Tim Perry <pimterry@gmail.com>
1 parent 364edc0 commit a68ec45

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎test/parallel/test-http2-stream-backpressure-unread-peer.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ serverSession.on('stream', common.mustCall((stream) => {
109109
assert(source.isPaused());
110110
assert(stream.writableNeedDrain);
111111

112-
// Four chunks fill the stream's 64KB writable buffer and one more is
113-
// prefetched into the source's 16KB readable buffer. Only 80KB of the
114-
// 1MB source is produced before TCP backpressure stops buffering.
115-
assert.strictEqual(produced, CHUNK_SIZE * 5);
112+
// Exact amount produced depends on platform-specific variables but
113+
// backpressure must stop the source well before it completes:
114+
assert.ok(produced <= RESPONSE_SIZE / 4,
115+
`produced ${produced} of ${RESPONSE_SIZE} bytes`);
116116

117117
serverSession.destroy();
118118
socket.destroy();

0 commit comments

Comments
 (0)