diff options
Diffstat (limited to 'jstests/noPassthrough/dropcollection_duplicate_fields.js')
-rw-r--r-- | jstests/noPassthrough/dropcollection_duplicate_fields.js | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/jstests/noPassthrough/dropcollection_duplicate_fields.js b/jstests/noPassthrough/dropcollection_duplicate_fields.js index a2a1c1c8839..22e7c3fdeeb 100644 --- a/jstests/noPassthrough/dropcollection_duplicate_fields.js +++ b/jstests/noPassthrough/dropcollection_duplicate_fields.js @@ -4,26 +4,25 @@ */ (function() { - "use strict"; - var conn = MongoRunner.runMongod(); - var db = conn.getDB('test'); +"use strict"; +var conn = MongoRunner.runMongod(); +var db = conn.getDB('test'); - let coll = db.dropcollection_duplicate_fields; - // Repeat 100 times for the sake of probabilities - for (let i = 0; i < 100; i++) { - coll.drop(); - coll.insert({x: 1}); +let coll = db.dropcollection_duplicate_fields; +// Repeat 100 times for the sake of probabilities +for (let i = 0; i < 100; i++) { + coll.drop(); + coll.insert({x: 1}); - assert.commandWorked(db.adminCommand( - {configureFailPoint: 'WTWriteConflictException', mode: {activationProbability: 0.1}})); + assert.commandWorked(db.adminCommand( + {configureFailPoint: 'WTWriteConflictException', mode: {activationProbability: 0.1}})); - // will blow up if res is not valid - let res = db.runCommand({drop: 'dropcollection_duplicate_fields'}); + // will blow up if res is not valid + let res = db.runCommand({drop: 'dropcollection_duplicate_fields'}); - assert.commandWorked( - db.adminCommand({configureFailPoint: 'WTWriteConflictException', mode: "off"})); - } - - MongoRunner.stopMongod(conn); + assert.commandWorked( + db.adminCommand({configureFailPoint: 'WTWriteConflictException', mode: "off"})); +} +MongoRunner.stopMongod(conn); })(); |