Skip to content

Commit

Permalink
removed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
IslandRhythms committed Mar 25, 2021
1 parent 7a93c16 commit 6f0133a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
3 changes: 0 additions & 3 deletions lib/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ const parseConnectionString = require('mongodb/lib/core').parseConnectionString;
const arrayAtomicsSymbol = require('./helpers/symbols').arrayAtomicsSymbol;
const sessionNewDocuments = require('./helpers/symbols').sessionNewDocuments;

// let id = 0;

/*!
* A list of authentication mechanisms that don't require a password for authentication.
* This is used by the authMechanismDoesNotRequirePassword method.
Expand Down Expand Up @@ -70,7 +68,6 @@ function Connection(base) {
this._closeCalled = false;
this._hasOpened = false;
this.plugins = [];
// this.id = id++;
if (typeof base === 'undefined' || !base.connections.length) {
this.id = 0;
} else {
Expand Down
5 changes: 0 additions & 5 deletions test/connection.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1301,15 +1301,10 @@ describe('connections:', function() {
});
it('Connection id should be scoped per Mongoose Instance (gh-10025)', function() {
const m = new mongoose.Mongoose;
// console.log('First Instance', m.connection.id); // should be x
const conn = m.createConnection();
// console.log(conn.id); // should be x + 1
const m1 = new mongoose.Mongoose;
// console.log('Second Instance', m1.connection.id); // should be y
const conn2 = m1.createConnection();
// console.log(conn2.id); // should be y + 1;
const conn3 = m.createConnection();
// console.log('Back to First Instance', conn3.id); // should be x + 2
assert.deepStrictEqual(m.connection.id, 0);
assert.deepStrictEqual(conn.id, m.connection.id + 1);
assert.deepStrictEqual(m1.connection.id, 0);
Expand Down

0 comments on commit 6f0133a

Please sign in to comment.