diff options
Diffstat (limited to 'jstests/noPassthroughWithMongod/dup_bgindex.js')
-rw-r--r-- | jstests/noPassthroughWithMongod/dup_bgindex.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/jstests/noPassthroughWithMongod/dup_bgindex.js b/jstests/noPassthroughWithMongod/dup_bgindex.js index 3d36e90a4ae..cd0078248bb 100644 --- a/jstests/noPassthroughWithMongod/dup_bgindex.js +++ b/jstests/noPassthroughWithMongod/dup_bgindex.js @@ -2,15 +2,15 @@ // This test runs fairly quickly but cannot be in /jstests/. So it lives in slowNightly for now. var t = db.duplIndexTest; t.drop(); -for (var i=0; i<10000; i++) { - t.insert( { name : "foo" , z : { a : 17 , b : 4}, i: i } ); +for (var i = 0; i < 10000; i++) { + t.insert({name: "foo", z: {a: 17, b: 4}, i: i}); } var cmd = "db.duplIndexTest.ensureIndex( { i : 1 }, {background:true} );"; var join1 = startParallelShell(cmd); var join2 = startParallelShell(cmd); -t.ensureIndex( { i : 1 }, {background:true} ); -assert.eq(1, t.find({i:1}).count(), "Should find only one doc"); -t.dropIndex({ i : 1 }); -assert.eq(1, t.find({i:1}).count(), "Should find only one doc"); +t.ensureIndex({i: 1}, {background: true}); +assert.eq(1, t.find({i: 1}).count(), "Should find only one doc"); +t.dropIndex({i: 1}); +assert.eq(1, t.find({i: 1}).count(), "Should find only one doc"); join1(); join2(); |