mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
test: make flaky test stricter
Make assertions in flaky test stricter to possibly make it easier to determine the root cause. Refs: https://github.com/nodejs/node/issues/4066 PR-URL: https://github.com/nodejs/node/pull/33539 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
1 parent
dcc112b7f7
commit
9949a2e1e3
1 file changed
+2
-4
@@ -47,6 +47,7 @@ server.listen(0, function() {
|
||||
}
|
||||
|
||||
req.on('error', common.mustCall(function(er) {
|
||||
assert.strictEqual(req.res, null);
|
||||
switch (er.code) {
|
||||
// This is the expected case
|
||||
case 'ECONNRESET':
|
||||
@@ -73,10 +74,7 @@ server.listen(0, function() {
|
||||
server.close();
|
||||
}));
|
||||
|
||||
req.on('response', function(res) {
|
||||
res.on('data', common.mustNotCall('Should not receive response data'));
|
||||
res.on('end', common.mustNotCall('Should not receive response end'));
|
||||
});
|
||||
req.on('response', common.mustNotCall());
|
||||
|
||||
write();
|
||||
});
|
||||
Reference in new issue
Block a user