Skip to content

Commit

Permalink
test: add mustCall to test-net-eaddrinuse test
Browse files Browse the repository at this point in the history
PR-URL: #27448
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
tongshouyu authored and targos committed Apr 29, 2019
1 parent 6fd1384 commit d784ecb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/parallel/test-net-eaddrinuse.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.

'use strict';
require('../common');
const common = require('../common');
const assert = require('assert');
const net = require('net');

const server1 = net.createServer(function(socket) {
});
const server2 = net.createServer(function(socket) {
});
server1.listen(0, function() {
server1.listen(0, common.mustCall(function() {
server2.on('error', function(error) {
assert.strictEqual(error.message.includes('EADDRINUSE'), true);
server1.close();
});
server2.listen(this.address().port);
});
}));

0 comments on commit d784ecb

Please sign in to comment.