diff --git a/src/mongo_client.ts b/src/mongo_client.ts index 6768f7428c..c2c42c0318 100644 --- a/src/mongo_client.ts +++ b/src/mongo_client.ts @@ -628,7 +628,7 @@ export class MongoClient extends TypedEventEmitter implements this, new RunAdminCommandOperation( { endSessions }, - { readPreference: ReadPreference.primaryPreferred, writeConcern: { w: 0 } } + { readPreference: ReadPreference.primaryPreferred, moreToCome: true } ) ); } catch (error) { diff --git a/src/operations/run_command.ts b/src/operations/run_command.ts index 1213f541da..ae24a9a6df 100644 --- a/src/operations/run_command.ts +++ b/src/operations/run_command.ts @@ -52,7 +52,7 @@ export class RunAdminCommandOperation extends AbstractOperation constructor( public command: Document, public override options: RunCommandOptions & { - writeConcern?: WriteConcern; + moreToCome?: boolean; bypassPinningCheck?: boolean; } ) { @@ -73,8 +73,4 @@ export class RunAdminCommandOperation extends AbstractOperation }); return res; } -} - -defineAspects(RunAdminCommandOperation, [ - Aspect.WRITE_OPERATION -]); \ No newline at end of file +} \ No newline at end of file diff --git a/test/integration/collection-management/collection.test.ts b/test/integration/collection-management/collection.test.ts index 1d9afa37d7..809b4697de 100644 --- a/test/integration/collection-management/collection.test.ts +++ b/test/integration/collection-management/collection.test.ts @@ -551,7 +551,7 @@ describe('Collection', function () { } } - it.only('isCapped should return false for uncapped collections', async function () { + it('isCapped should return false for uncapped collections', async function () { await testCapped(configuration, { config: configuration, collName: 'uncapped', @@ -559,7 +559,7 @@ describe('Collection', function () { }); }); - it.only('isCapped should return false for collections instantiated without specifying capped', async function () { + it('isCapped should return false for collections instantiated without specifying capped', async function () { await testCapped(configuration, { config: configuration, collName: 'uncapped2', opts: {} }); }); diff --git a/test/integration/crud/misc_cursors.test.js b/test/integration/crud/misc_cursors.test.js index e56bbe1d3d..dacad6cc7e 100644 --- a/test/integration/crud/misc_cursors.test.js +++ b/test/integration/crud/misc_cursors.test.js @@ -1496,7 +1496,7 @@ describe('Cursor', function () { } }); - it.only('does not auto destroy streams', function (done) { + it('does not auto destroy streams', function (done) { const docs = []; for (var i = 0; i < 10; i++) { diff --git a/test/integration/read-write-concern/write_concern.test.ts b/test/integration/read-write-concern/write_concern.test.ts index 96222b82f4..4f1f7df809 100644 --- a/test/integration/read-write-concern/write_concern.test.ts +++ b/test/integration/read-write-concern/write_concern.test.ts @@ -15,7 +15,7 @@ import { import * as mock from '../../tools/mongodb-mock/index'; import { filterForCommands } from '../shared'; -describe.only('Write Concern', function () { +describe('Write Concern', function () { context('when the WriteConcern is set in the uri', function () { let client; const events: CommandStartedEvent[] = []; @@ -173,7 +173,7 @@ describe.only('Write Concern', function () { }); }); - describe('fire-and-forget protocol', function () { + describe.only('fire-and-forget protocol', function () { context('when writeConcern = 0 and OP_MSG is used', function () { const writeOperations: { name: string; command: any; expectedReturnVal: any }[] = [ { diff --git a/test/unit/cmap/connection.test.ts b/test/unit/cmap/connection.test.ts index 993e248786..616b937225 100644 --- a/test/unit/cmap/connection.test.ts +++ b/test/unit/cmap/connection.test.ts @@ -28,7 +28,7 @@ describe('new Connection()', function () { before(() => mock.createServer().then(s => (server = s))); - it('supports fire-and-forget messages', async function () { + it.only('supports fire-and-forget messages', async function () { server.setMessageHandler(request => { const doc = request.document; if (isHello(doc)) { @@ -47,7 +47,7 @@ describe('new Connection()', function () { const conn = await connect(options); const readSpy = sinon.spy(conn, 'readMany'); - await conn.command(ns('$admin.cmd'), { ping: 1 }, { writeConcern: { w: 0 } }); + await conn.command(ns('$admin.cmd'), { ping: 1 }, { moreToCome: true }); expect(readSpy).to.not.have.been.called; }); diff --git a/test/unit/collection.test.ts b/test/unit/collection.test.ts index b050e69dc9..a6f40e7783 100644 --- a/test/unit/collection.test.ts +++ b/test/unit/collection.test.ts @@ -15,7 +15,7 @@ describe('Collection', function () { }); context('#createIndex', () => { - it('should error when createIndex fails', function (done) { + it.only('should error when createIndex fails', function (done) { const ERROR_RESPONSE = { ok: 0, errmsg: