summaryrefslogtreecommitdiff
path: root/jstests/sharding/basic_drop_coll.js
diff options
context:
space:
mode:
authorjannaerin <golden.janna@gmail.com>2018-02-07 17:38:49 -0500
committerjannaerin <golden.janna@gmail.com>2018-03-09 00:40:40 -0500
commitda1e0304e8eb91711ea1c78eb8f62538b53680e7 (patch)
treee55d32a40a76a39e01d8848c5a17d97ad640b18e /jstests/sharding/basic_drop_coll.js
parent0d5370783beeb4936a181dd2f69387da4b5e816c (diff)
downloadmongo-da1e0304e8eb91711ea1c78eb8f62538b53680e7.tar.gz
SERVER-32052 Update ShardingTest to default to starting shard servers as replica sets
Diffstat (limited to 'jstests/sharding/basic_drop_coll.js')
-rw-r--r--jstests/sharding/basic_drop_coll.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/jstests/sharding/basic_drop_coll.js b/jstests/sharding/basic_drop_coll.js
index 1f2c1609969..4ac0105ed57 100644
--- a/jstests/sharding/basic_drop_coll.js
+++ b/jstests/sharding/basic_drop_coll.js
@@ -20,17 +20,17 @@
// Test dropping a sharded collection.
assert.commandWorked(st.s.adminCommand({enableSharding: 'test'}));
- st.ensurePrimaryShard('test', 'shard0000');
+ st.ensurePrimaryShard('test', st.shard0.shardName);
st.s.adminCommand({shardCollection: 'test.user', key: {_id: 1}});
st.s.adminCommand({split: 'test.user', middle: {_id: 0}});
assert.commandWorked(
- st.s.adminCommand({moveChunk: 'test.user', find: {_id: 0}, to: 'shard0001'}));
+ st.s.adminCommand({moveChunk: 'test.user', find: {_id: 0}, to: st.shard1.shardName}));
assert.writeOK(testDB.user.insert({_id: 10}));
assert.writeOK(testDB.user.insert({_id: -10}));
- assert.neq(null, st.d0.getDB('test').user.findOne({_id: -10}));
- assert.neq(null, st.d1.getDB('test').user.findOne({_id: 10}));
+ assert.neq(null, st.shard0.getDB('test').user.findOne({_id: -10}));
+ assert.neq(null, st.shard1.getDB('test').user.findOne({_id: 10}));
var configDB = st.s.getDB('config');
var collDoc = configDB.collections.findOne({_id: 'test.user'});
@@ -41,8 +41,8 @@
assert.commandWorked(testDB.runCommand({drop: 'user'}));
- assert.eq(null, st.d0.getDB('test').user.findOne());
- assert.eq(null, st.d1.getDB('test').user.findOne());
+ assert.eq(null, st.shard0.getDB('test').user.findOne());
+ assert.eq(null, st.shard1.getDB('test').user.findOne());
// Call drop again to verify that the command is idempotent.
assert.commandWorked(testDB.runCommand({drop: 'user'}));