We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9011c87 commit a756b92Copy full SHA for a756b92
test/parallel/test-http-timeout.js
@@ -20,17 +20,17 @@
20
// USE OR OTHER DEALINGS IN THE SOFTWARE.
21
22
'use strict';
23
-require('../common');
+const common = require('../common');
24
25
const http = require('http');
26
const Countdown = require('../common/countdown');
27
+const MAX_COUNT = 11;
28
-const server = http.createServer(function(req, res) {
29
+const server = http.createServer(common.mustCall(function(req, res) {
30
res.writeHead(200, { 'Content-Type': 'text/plain' });
31
res.end('OK');
-});
32
+}, MAX_COUNT));
33
-const MAX_COUNT = 11;
34
const agent = new http.Agent({ maxSockets: 1 });
35
const countdown = new Countdown(MAX_COUNT, () => server.close());
36
0 commit comments