summaryrefslogtreecommitdiff
path: root/jstests/core/batch_write_command_insert.js
diff options
context:
space:
mode:
authorEric Milkie <milkie@10gen.com>2014-03-21 10:15:50 -0400
committerEric Milkie <milkie@10gen.com>2014-03-21 10:15:53 -0400
commitf6713955af2bfe8a2c5f5ac7d0dfcabebbc821c5 (patch)
tree5464a6214cc1c7e972943c041ec98d9f05e850e7 /jstests/core/batch_write_command_insert.js
parent064702d6c3d0ef51ae9767390bf664df9f3e30f4 (diff)
downloadmongo-f6713955af2bfe8a2c5f5ac7d0dfcabebbc821c5.tar.gz
SERVER-13305 fix test for small_oplog
Diffstat (limited to 'jstests/core/batch_write_command_insert.js')
-rw-r--r--jstests/core/batch_write_command_insert.js30
1 files changed, 16 insertions, 14 deletions
diff --git a/jstests/core/batch_write_command_insert.js b/jstests/core/batch_write_command_insert.js
index 542d24d9dc3..79ac259275b 100644
--- a/jstests/core/batch_write_command_insert.js
+++ b/jstests/core/batch_write_command_insert.js
@@ -214,20 +214,6 @@ assert.eq(1, result.n);
assert.eq(coll.getIndexes().length, 2);
//
-// Background index creation
-coll.drop();
-coll.insert({ x : 1 });
-printjson(request = {insert : "system.indexes",
- documents : [{ns : coll.toString(),
- key : {x : 1},
- name : "x_1",
- background : true}]});
-printjson( result = coll.runCommand(request) );
-assert(result.ok);
-assert.eq(1, result.n);
-assert.eq(coll.getIndexes().length, 2);
-
-//
// Duplicate index insertion gives n = 0
coll.drop();
coll.ensureIndex({x : 1}, {unique : true});
@@ -300,3 +286,19 @@ printjson(result = coll.runCommand(request));
assert(!result.ok);
assert.eq(coll.getIndexes().length, 0);
+//
+// Background index creation
+// Note: due to SERVER-13304 this test is at the end of this file, and we don't drop
+// the collection afterwards.
+coll.drop();
+coll.insert({ x : 1 });
+printjson(request = {insert : "system.indexes",
+ documents : [{ns : coll.toString(),
+ key : {x : 1},
+ name : "x_1",
+ background : true}]});
+printjson( result = coll.runCommand(request) );
+assert(result.ok);
+assert.eq(1, result.n);
+assert.eq(coll.getIndexes().length, 2);
+