summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2016-07-13 09:12:59 -0700
committerRich Trott <rtrott@gmail.com>2016-07-17 10:53:08 -0700
commit7cb70e9eceb5c939b2d7167e0ce08f887e865fb5 (patch)
treed0a3ee2884131bc6b1923dd0c8b63e05cd77ec6f /test
parent151d316b99d56a4614c95cc59ea7a0c9c0f1928b (diff)
downloadandroid-node-v8-7cb70e9eceb5c939b2d7167e0ce08f887e865fb5.tar.gz
android-node-v8-7cb70e9eceb5c939b2d7167e0ce08f887e865fb5.tar.bz2
android-node-v8-7cb70e9eceb5c939b2d7167e0ce08f887e865fb5.zip
test: fix flaky test-http-server-consumed-timeout
Using identical timeout values appears to have eliminated the flakiness in the test. Fixes: https://github.com/nodejs/node/issues/7643 PR-URL: https://github.com/nodejs/node/pull/7717 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/parallel/test-http-server-consumed-timeout.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/parallel/test-http-server-consumed-timeout.js b/test/parallel/test-http-server-consumed-timeout.js
index 362b052ee7..799992e2c4 100644
--- a/test/parallel/test-http-server-consumed-timeout.js
+++ b/test/parallel/test-http-server-consumed-timeout.js
@@ -1,7 +1,6 @@
'use strict';
const common = require('../common');
-const assert = require('assert');
const http = require('http');
const server = http.createServer((req, res) => {
@@ -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(() => {
@@ -30,7 +29,7 @@ server.listen(0, common.mustCall(() => {
setTimeout(() => {
clearInterval(interval);
req.end();
- }, common.platformTimeout(400));
+ }, common.platformTimeout(200));
});
req.write('.');
}));