diff options
author | Randolph Tan <randolph@10gen.com> | 2014-02-12 18:33:43 -0500 |
---|---|---|
committer | Randolph Tan <randolph@10gen.com> | 2014-02-12 18:33:43 -0500 |
commit | a210230220941b0a3b699ba0dce874ac137c66ae (patch) | |
tree | 2bf495717448fe778309ef0d61428ab068904cb0 /jstests/sharding/array_shard_key.js | |
parent | ea4ba610f072cbcdecd3fda4e5fb8b5c1833476c (diff) | |
download | mongo-a210230220941b0a3b699ba0dce874ac137c66ae.tar.gz |
SERVER-9620 Index can be made multikey if a prefix of it is a shard key
Fix test to replace empty remove
Diffstat (limited to 'jstests/sharding/array_shard_key.js')
-rw-r--r-- | jstests/sharding/array_shard_key.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/jstests/sharding/array_shard_key.js b/jstests/sharding/array_shard_key.js index 902c3227b8c..09b9ca41a46 100644 --- a/jstests/sharding/array_shard_key.js +++ b/jstests/sharding/array_shard_key.js @@ -87,14 +87,14 @@ assert.eq( coll.find().itcount(), 0 ) coll.ensureIndex({ _id : 1, i : 1, j: 1 }); // Can insert document that will make index into a multi-key as long as it's not part of shard key. -coll.remove(); +coll.drop(); coll.insert({ i: 1, j: [1, 2] }); error = coll.getDB().getLastError(); assert.eq( error, null ); assert.eq( coll.find().itcount(), 1 ); // Same is true for updates. -coll.remove(); +coll.drop(); coll.insert({ _id: 1, i: 1 }); coll.update({ _id: 1, i: 1 }, { _id: 1, i:1, j: [1, 2] }); error = coll.getDB().getLastError(); @@ -102,7 +102,7 @@ assert.eq( error, null ); assert.eq( coll.find().itcount(), 1 ); // Same for upserts. -coll.remove(); +coll.drop(); coll.update({ _id: 1, i: 1 }, { _id: 1, i:1, j: [1, 2] }, true); error = coll.getDB().getLastError(); assert.eq( error, null ); |