summaryrefslogtreecommitdiff
path: root/jstests/sharding/cluster_create_indexes_always_routes_through_primary.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/sharding/cluster_create_indexes_always_routes_through_primary.js')
-rw-r--r--jstests/sharding/cluster_create_indexes_always_routes_through_primary.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/jstests/sharding/cluster_create_indexes_always_routes_through_primary.js b/jstests/sharding/cluster_create_indexes_always_routes_through_primary.js
index 6c661e0abac..6b61bd12a68 100644
--- a/jstests/sharding/cluster_create_indexes_always_routes_through_primary.js
+++ b/jstests/sharding/cluster_create_indexes_always_routes_through_primary.js
@@ -1,5 +1,5 @@
// Ensure that a call to createIndexes in a sharded cluster will route to the primary, even when
-// setSlaveOk() is set to true.
+// setSecondaryOk() is set to true.
(function() {
'use strict';
@@ -12,7 +12,7 @@ assert.commandWorked(testDB.adminCommand({enableSharding: testDBName}));
assert.commandWorked(
testDB.adminCommand({shardCollection: testDB[collName].getFullName(), key: {x: 1}}));
-st.s.setSlaveOk(true);
+st.s.setSecondaryOk();
assert.commandWorked(
testDB.runCommand({createIndexes: collName, indexes: [{key: {a: 1}, name: "index"}]}));