Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix flaky test-http-server-consumed-timeout #7717

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions test/parallel/test-http-server-consumed-timeout.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

const common = require('../common');
const assert = require('assert');
const http = require('http');

const server = http.createServer((req, res) => {
Expand All @@ -11,7 +10,7 @@ const server = http.createServer((req, res) => {
res.flushHeaders();

req.setTimeout(common.platformTimeout(200), () => {
assert(false, 'Should not happen');
common.fail('Request timeout should not fire');
});
req.resume();
req.once('end', common.mustCall(() => {
Expand All @@ -30,7 +29,7 @@ server.listen(0, common.mustCall(() => {
setTimeout(() => {
clearInterval(interval);
req.end();
}, common.platformTimeout(400));
}, common.platformTimeout(200));
});
req.write('.');
}));