Skip to content

Commit d9e5d80

Browse files
HanaPearlmannbbeeken
authored andcommitted
update tests to use new wc shape
1 parent 5f04cfc commit d9e5d80

23 files changed

+755
-584
lines changed

src/bulk/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,7 @@ export abstract class BulkOperationBase {
10721072
* bulkOp.find({ h: 8 }).delete();
10731073
*
10741074
* // Add a replaceOne
1075-
* bulkOp.find({ i: 9 }).replaceOne({ j: 10 });
1075+
* bulkOp.find({ i: 9 }).replaceOne({writeConcern: { j: 10 }});
10761076
*
10771077
* // Update using a pipeline (requires Mongodb 4.2 or higher)
10781078
* bulk.find({ k: 11, y: { $exists: true }, z: { $exists: true } }).updateOne([

test/functional/client_side_encryption/prose.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ describe('Client Side Encryption Prose Tests', function () {
478478
return this.client
479479
.db(keyVaultDbName)
480480
.collection(keyVaultCollName)
481-
.insertOne(limitsKey, { w: 'majority' });
481+
.insertOne(limitsKey, { writeConcern: { w: 'majority' } });
482482
})
483483
);
484484
});
@@ -735,7 +735,7 @@ describe('Client Side Encryption Prose Tests', function () {
735735
return this.client
736736
.db(keyVaultDbName)
737737
.collection(keyVaultCollName)
738-
.insertOne(externalKey, { w: 'majority' });
738+
.insertOne(externalKey, { writeConcern: { w: 'majority' } });
739739
})
740740
);
741741
});

test/functional/connections_stepdown.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ describe('Connections survive primary step down', function () {
5656
db = client.db('step-down');
5757
collection = db.collection('step-down');
5858
})
59-
.then(() => collection.drop({ w: 'majority' }))
59+
.then(() => collection.drop({ writeConcern: { w: 'majority' } }))
6060
.catch(ignoreNsNotFound)
61-
.then(() => db.createCollection('step-down', { w: 'majority' }));
61+
.then(() => db.createCollection('step-down', { writeConcern: { w: 'majority' } }));
6262
});
6363

6464
let deferred = [];
@@ -75,7 +75,7 @@ describe('Connections survive primary step down', function () {
7575
test: function () {
7676
return collection
7777
.insertMany([{ a: 1 }, { a: 2 }, { a: 3 }, { a: 4 }, { a: 5 }], {
78-
w: 'majority'
78+
writeConcern: { w: 'majority' }
7979
})
8080
.then(result => expect(result.insertedCount).to.equal(5))
8181
.then(() => {

0 commit comments

Comments
 (0)