Skip to content

Commit

Permalink
test: apply camelCase in test-net-reconnect-error
Browse files Browse the repository at this point in the history
Rename two idnetifiers that were snake_case rather than camelCase.

Signed-off-by: Rich Trott <[email protected]>

PR-URL: #32120
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
  • Loading branch information
Trott authored and MylesBorins committed Mar 9, 2020
1 parent dd83bd2 commit 74edcc5
Showing 1 changed file with 6 additions and 6 deletions.
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);
});

0 comments on commit 74edcc5

Please sign in to comment.