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 <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 authored and codebytere committed Mar 30, 2020
1 parent 8a0b0a7 commit f365e5c
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 f365e5c

Please sign in to comment.