Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
test: apply camelCase in test-net-reconnect-error
Rename two idnetifiers that were snake_case rather than camelCase.

Signed-off-by: Rich Trott <rtrott@gmail.com>

PR-URL: #32120
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
  • Loading branch information
Trott committed Mar 8, 2020
commit 4c6ef4b7e28afb31228ce29bf3a20f94b90554dc
12 changes: 6 additions & 6 deletions test/sequential/test-net-reconnect-error.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,24 @@ const common = require('../common');
const net = require('net');
const assert = require('assert');
const N = 20;
let client_error_count = 0;
let disconnect_count = 0;
let clientErrorCount = 0;
let disconnectCount = 0;

const c = net.createConnection(common.PORT);

c.on('connect', common.mustNotCall('client should not have connected'));

c.on('error', common.mustCall((e) => {
client_error_count++;
clientErrorCount++;
assert.strictEqual(e.code, 'ECONNREFUSED');
}, N + 1));

c.on('close', common.mustCall(() => {
if (disconnect_count++ < N)
if (disconnectCount++ < N)
c.connect(common.PORT); // reconnect
}, N + 1));

process.on('exit', function() {
assert.strictEqual(disconnect_count, N + 1);
assert.strictEqual(client_error_count, N + 1);
assert.strictEqual(disconnectCount, N + 1);
assert.strictEqual(clientErrorCount, N + 1);
});