summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorVincent Do <do.vincent@live.com>2016-05-03 13:59:28 -0400
committerVincent Do <do.vincent@live.com>2016-05-09 16:48:09 -0400
commitdbde7d0f140d54c2e84c4ec78f14c52ef94b9b37 (patch)
treee65801a5c021445555f3b530695329828af9c8ca /jstests
parent27e760767c4fbae02de298fa6e51ed85bf83ff52 (diff)
downloadmongo-dbde7d0f140d54c2e84c4ec78f14c52ef94b9b37.tar.gz
SERVER-19642 Add check for duplicate keys in index spec
Diffstat (limited to 'jstests')
-rw-r--r--jstests/core/batch_write_command_insert.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/jstests/core/batch_write_command_insert.js b/jstests/core/batch_write_command_insert.js
index 3405785ecce..c5897cb9bac 100644
--- a/jstests/core/batch_write_command_insert.js
+++ b/jstests/core/batch_write_command_insert.js
@@ -310,7 +310,7 @@ result = coll.runCommand(request);
assert(result.ok, tojson(result));
assert.eq(0, result.n);
assert.eq(0, result.writeErrors[0].index);
-assert.eq(coll.getIndexes().length, 1);
+assert.eq(coll.getIndexes().length, 0);
//
// Invalid index desc
@@ -320,6 +320,7 @@ request = {
documents: [{ns: coll.toString(), key: {x: 1}}]
};
result = coll.runCommand(request);
+print(tojson(result));
assert(result.ok, tojson(result));
assert.eq(0, result.n);
assert.eq(0, result.writeErrors[0].index);
@@ -336,7 +337,7 @@ result = coll.runCommand(request);
assert(result.ok, tojson(result));
assert.eq(0, result.n);
assert.eq(0, result.writeErrors[0].index);
-assert.eq(coll.getIndexes().length, 1);
+assert.eq(coll.getIndexes().length, 0);
//
// Cannot insert more than one index at a time through the batch writes