Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
aditi-khare-mongoDB committed Sep 16, 2024
1 parent 89ed6a3 commit f3b47c0
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/mongo_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ export class MongoClient extends TypedEventEmitter<MongoClientEvents> implements
this,
new RunAdminCommandOperation(
{ endSessions },
{ readPreference: ReadPreference.primaryPreferred, writeConcern: { w: 0 } }
{ readPreference: ReadPreference.primaryPreferred, moreToCome: true }
)
);
} catch (error) {
Expand Down
8 changes: 2 additions & 6 deletions src/operations/run_command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class RunAdminCommandOperation<T = Document> extends AbstractOperation<T>
constructor(
public command: Document,
public override options: RunCommandOptions & {
writeConcern?: WriteConcern;
moreToCome?: boolean;
bypassPinningCheck?: boolean;
}
) {
Expand All @@ -73,8 +73,4 @@ export class RunAdminCommandOperation<T = Document> extends AbstractOperation<T>
});
return res;
}
}

defineAspects(RunAdminCommandOperation, [
Aspect.WRITE_OPERATION
]);
}
4 changes: 2 additions & 2 deletions test/integration/collection-management/collection.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -551,15 +551,15 @@ 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',
opts: { capped: false }
});
});

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: {} });
});

Expand Down
2 changes: 1 addition & 1 deletion test/integration/crud/misc_cursors.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down
4 changes: 2 additions & 2 deletions test/integration/read-write-concern/write_concern.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = [];
Expand Down Expand Up @@ -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 }[] = [
{
Expand Down
4 changes: 2 additions & 2 deletions test/unit/cmap/connection.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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;
});

Expand Down
2 changes: 1 addition & 1 deletion test/unit/collection.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit f3b47c0

Please sign in to comment.