Skip to content

Commit

Permalink
requested changes 1
Browse files Browse the repository at this point in the history
  • Loading branch information
aditi-khare-mongoDB committed Sep 12, 2024
1 parent 41641a5 commit 7ca5e03
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 1 addition & 7 deletions test/integration/read-write-concern/write_concern.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
OpMsgRequest
} from '../../mongodb';
import * as mock from '../../tools/mongodb-mock/index';
import { sleep } from '../../tools/utils';
import { filterForCommands } from '../shared';

describe('Write Concern', function () {
Expand Down Expand Up @@ -98,8 +97,7 @@ describe('Write Concern', function () {
});

afterEach(async function () {
await db.dropDatabase();
await sleep(1000);
await db.dropDatabase({ writeConcern: { w: 'majority' } });
await client.close();
});

Expand Down Expand Up @@ -136,8 +134,6 @@ describe('Write Concern', function () {
await col.createIndex({ b: -1 });
await col.createIndex({ a: 1, b: -1 });

await sleep(1000);

const listIndexesResult = col.listIndexes({ batchSize: 2 });
const err = await listIndexesResult.toArray().catch(e => e);
expect(err).to.not.be.instanceOf(Error);
Expand Down Expand Up @@ -168,8 +164,6 @@ describe('Write Concern', function () {
{ writeConcern: { w: 'majority' } }
);

await sleep(1000);

const err = await changes.next().catch(e => e);
expect(err).to.not.be.instanceOf(Error);
}
Expand Down
2 changes: 1 addition & 1 deletion test/unit/commands.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ describe('class OpCompressedRequest', () => {
});

describe('OpMsgRequest', () => {
describe('fire-and-forget', () => {
describe('#constructor', () => {
context('when writeConcern = 0', () => {
it('moreToCome is set to true', async () => {
const request = new OpMsgRequest('db', { a: 1, writeConcern: { w: 0 } }, {});
Expand Down

0 comments on commit 7ca5e03

Please sign in to comment.