Skip to content

Commit 504847a

Browse files
committed
pr feedback
1 parent d56da5b commit 504847a

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

test/integration/sessions/sessions.test.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import type { TestConfiguration } from '../../tools/runner/config';
1212
import { setupDatabase } from '../shared';
1313

1414
const ignoredCommands = [LEGACY_HELLO_COMMAND];
15-
let hasInitialPingOccurred = false;
1615
const test: {
1716
client: MongoClient;
1817
commands: { started: CommandStartedEvent[]; succeeded: CommandSucceededEvent[] };
@@ -24,16 +23,7 @@ const test: {
2423
this.commands = { started: [], succeeded: [] };
2524
this.client = config.newClient({ w: 1 }, { maxPoolSize: 1, monitorCommands: true });
2625

27-
// Because we have a MongoClient.connect method, an extra 'ping' event is sent to the
28-
// server when authentication is enabled. We have to detect the scenario when auth is
29-
// enabled for the test and ignore the initial ping. This will be addressed in NODE-2149.
30-
const auth = config.options.auth;
31-
const isAuthEnabled = !!(auth && auth.username && auth.password);
3226
this.client.on('commandStarted', event => {
33-
if (event.commandName === 'ping' && isAuthEnabled && !hasInitialPingOccurred) {
34-
hasInitialPingOccurred = true;
35-
return;
36-
}
3727
if (ignoredCommands.indexOf(event.commandName) === -1) {
3828
this.commands.started.push(event);
3929
}

0 commit comments

Comments
 (0)