Skip to content

Commit 7ca5e03

Browse files
requested changes 1
1 parent 41641a5 commit 7ca5e03

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

test/integration/read-write-concern/write_concern.test.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import {
1313
OpMsgRequest
1414
} from '../../mongodb';
1515
import * as mock from '../../tools/mongodb-mock/index';
16-
import { sleep } from '../../tools/utils';
1716
import { filterForCommands } from '../shared';
1817

1918
describe('Write Concern', function () {
@@ -98,8 +97,7 @@ describe('Write Concern', function () {
9897
});
9998

10099
afterEach(async function () {
101-
await db.dropDatabase();
102-
await sleep(1000);
100+
await db.dropDatabase({ writeConcern: { w: 'majority' } });
103101
await client.close();
104102
});
105103

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

139-
await sleep(1000);
140-
141137
const listIndexesResult = col.listIndexes({ batchSize: 2 });
142138
const err = await listIndexesResult.toArray().catch(e => e);
143139
expect(err).to.not.be.instanceOf(Error);
@@ -168,8 +164,6 @@ describe('Write Concern', function () {
168164
{ writeConcern: { w: 'majority' } }
169165
);
170166

171-
await sleep(1000);
172-
173167
const err = await changes.next().catch(e => e);
174168
expect(err).to.not.be.instanceOf(Error);
175169
}

test/unit/commands.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ describe('class OpCompressedRequest', () => {
111111
});
112112

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

0 commit comments

Comments
 (0)