Skip to content

Commit 89cd5ab

Browse files
committed
test: fix flaky test-http-agent-scheduling
test-http-agent-scheduling can be flaky on windows.
1 parent cd98ac9 commit 89cd5ab

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/parallel/test-http-agent-scheduling.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ function defaultTest() {
6161
assert.strictEqual(ports[ports.length - 1], port);
6262
makeRequest(url, agent, common.mustCall((port) => {
6363
assert.strictEqual(ports[ports.length - 1], port);
64+
server.closeAllConnections();
6465
server.close();
6566
agent.destroy();
6667
}));
@@ -89,6 +90,7 @@ function fifoTest() {
8990
assert.strictEqual(ports[1], port);
9091
makeRequest(url, agent, common.mustCall((port) => {
9192
assert.strictEqual(ports[2], port);
93+
server.closeAllConnections();
9294
server.close();
9395
agent.destroy();
9496
}));
@@ -117,6 +119,7 @@ function lifoTest() {
117119
assert.strictEqual(ports[ports.length - 1], port);
118120
makeRequest(url, agent, common.mustCall((port) => {
119121
assert.strictEqual(ports[ports.length - 1], port);
122+
server.closeAllConnections();
120123
server.close();
121124
agent.destroy();
122125
}));

0 commit comments

Comments
 (0)