| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 086bb2f commit d081032
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -34,8 +34,6 @@ test-crypto-dh-stateless: SKIP | |||
| 34 | 34 | test-crypto-keygen: SKIP | |
| 35 | 35 | ||
| 36 | 36 | [$system==solaris] # Also applies to SmartOS | |
| 37 | - # https://github.com/nodejs/node/issues/43446 | ||
| 38 | - test-net-connect-reset-until-connected: PASS, FLAKY | ||
| 39 | 37 | # https://github.com/nodejs/node/issues/43457 | |
| 40 | 38 | test-domain-no-error-handler-abort-on-uncaught-0: PASS, FLAKY | |
| 41 | 39 | test-domain-no-error-handler-abort-on-uncaught-1: PASS,FLAKY | |
@@ -55,8 +53,6 @@ test-domain-with-abort-on-uncaught-exception: PASS, FLAKY | |||
| 55 | 53 | test-fs-stat-bigint: PASS,FLAKY | |
| 56 | 54 | # https://github.com/nodejs/node/issues/31280 | |
| 57 | 55 | test-worker-message-port-message-before-close: PASS,FLAKY | |
| 58 | - # https://github.com/nodejs/node/issues/43446 | ||
| 59 | - test-net-connect-reset-until-connected: PASS, FLAKY | ||
| 60 | 56 | ||
| 61 | 57 | [$system==aix] | |
| 62 | 58 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,18 +3,27 @@ | |||
| 3 | 3 | const common = require('../common'); | |
| 4 | 4 | const net = require('net'); | |
| 5 | 5 | ||
| 6 | + function barrier(count, cb) { | ||
| 7 | + return function() { | ||
| 8 | + if (--count === 0) | ||
| 9 | + cb(); | ||
| 10 | + }; | ||
| 11 | + } | ||
| 12 | + | ||
| 6 | 13 | const server = net.createServer(); | |
| 7 | 14 | server.listen(0, common.mustCall(function() { | |
| 8 | 15 | const port = server.address().port; | |
| 9 | 16 | const conn = net.createConnection(port); | |
| 17 | + const connok = barrier(2, () => conn.resetAndDestroy()); | ||
| 10 | 18 | conn.on('close', common.mustCall()); | |
| 11 | 19 | server.on('connection', (socket) => { | |
| 20 | + connok(); | ||
| 12 | 21 | socket.on('error', common.expectsError({ | |
| 13 | 22 | code: 'ECONNRESET', | |
| 14 | 23 | message: 'read ECONNRESET', | |
| 15 | 24 | name: 'Error' | |
| 16 | 25 | })); | |
| 17 | 26 | server.close(); | |
| 18 | 27 | }); | |
| 19 | - conn.resetAndDestroy(); | ||
| 28 | + conn.on('connect', connok); | ||
| 20 | 29 | })); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments