Skip to content

Commit 3032f0f

Browse files
ronagcodebytere
authored andcommitted
test: make flaky test stricter
Make assertions in flaky test stricter to possibly make it easier to determine the root cause. Refs: #4066 PR-URL: #33539 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 05cbd8f commit 3032f0f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

test/parallel/test-http-destroyed-socket-write2.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ server.listen(0, function() {
4747
}
4848

4949
req.on('error', common.mustCall(function(er) {
50+
assert.strictEqual(req.res, null);
5051
switch (er.code) {
5152
// This is the expected case
5253
case 'ECONNRESET':
@@ -73,10 +74,7 @@ server.listen(0, function() {
7374
server.close();
7475
}));
7576

76-
req.on('response', function(res) {
77-
res.on('data', common.mustNotCall('Should not receive response data'));
78-
res.on('end', common.mustNotCall('Should not receive response end'));
79-
});
77+
req.on('response', common.mustNotCall());
8078

8179
write();
8280
});

0 commit comments

Comments
 (0)