summaryrefslogtreecommitdiff
path: root/jstests/sharding/hash_shard_unique_compound.js
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2014-03-04 17:41:56 -0500
committerRandolph Tan <randolph@10gen.com>2014-04-21 16:53:25 -0400
commit7acafe85d9bdd63122c19ba1cca86a7f55174941 (patch)
tree234effd8e5a5b6c63d8b12c74de2d9acb78a7509 /jstests/sharding/hash_shard_unique_compound.js
parente87b42c4f13e48078f5c4aefba3caf18dcfba072 (diff)
downloadmongo-7acafe85d9bdd63122c19ba1cca86a7f55174941.tar.gz
SERVER-13425 migrate sharding jstest suite to use write commands api
Diffstat (limited to 'jstests/sharding/hash_shard_unique_compound.js')
-rw-r--r--jstests/sharding/hash_shard_unique_compound.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/jstests/sharding/hash_shard_unique_compound.js b/jstests/sharding/hash_shard_unique_compound.js
index ec8e6063aa0..832cb93600f 100644
--- a/jstests/sharding/hash_shard_unique_compound.js
+++ b/jstests/sharding/hash_shard_unique_compound.js
@@ -22,8 +22,7 @@ assert.commandWorked(db.adminCommand( { shardcollection : ns , key : { a : "hash
db.printShardingStatus();
// Create unique index
-coll.ensureIndex({a:1, b:1}, {unique:true})
-assert.gleSuccess(db, "unique index failed");
+assert.commandWorked(coll.ensureIndex({ a: 1, b: 1 }, { unique: true }));
jsTest.log("------ indexes -------")
jsTest.log(tojson(coll.getIndexes()));
@@ -33,8 +32,7 @@ jsTest.log("------ dropping sharded collection to start part 2 -------")
coll.drop();
//Create unique index
-coll.ensureIndex({a:1, b:1}, {unique:true})
-assert.gleSuccess(db, "unique index failed 2");
+assert.commandWorked(coll.ensureIndex({ a: 1, b: 1 }, { unique: true }));
// shard a fresh collection using a hashed shard key
assert.commandWorked(db.adminCommand( { shardcollection : ns , key : { a : "hashed" } } ),