summaryrefslogtreecommitdiff
path: root/jstests/replsets
diff options
context:
space:
mode:
authorGeert Bosch <geert@mongodb.com>2017-08-02 18:39:55 -0400
committerGeert Bosch <geert@mongodb.com>2017-09-21 11:44:19 -0400
commitd296e1dfed119fb3ef9d4907ac1875480f1408c8 (patch)
treec4a7b3baaf399dd721d59ed99feb730e57c21b05 /jstests/replsets
parentaffde69fb41c8a76bbd80dab2df3b36b3efb0450 (diff)
downloadmongo-d296e1dfed119fb3ef9d4907ac1875480f1408c8.tar.gz
SERVER-4941 Allow renameCollection during initial sync
Diffstat (limited to 'jstests/replsets')
-rw-r--r--jstests/replsets/initial_sync_applier_error.js1
-rw-r--r--jstests/replsets/initial_sync_rename_collection.js3
-rw-r--r--jstests/replsets/initial_sync_rename_collection_unsafe.js1
3 files changed, 2 insertions, 3 deletions
diff --git a/jstests/replsets/initial_sync_applier_error.js b/jstests/replsets/initial_sync_applier_error.js
index 9816e92fd74..7a280242024 100644
--- a/jstests/replsets/initial_sync_applier_error.js
+++ b/jstests/replsets/initial_sync_applier_error.js
@@ -44,7 +44,6 @@
assert.commandWorked(secondary.getDB('admin').runCommand(
{configureFailPoint: 'initialSyncHangBeforeCopyingDatabases', mode: 'off'}));
- checkLog.contains(secondary, 'Applying renameCollection not supported');
checkLog.contains(secondary, 'initial sync done');
replSet.awaitReplication();
diff --git a/jstests/replsets/initial_sync_rename_collection.js b/jstests/replsets/initial_sync_rename_collection.js
index b8736b5274d..fdb77ea6da4 100644
--- a/jstests/replsets/initial_sync_rename_collection.js
+++ b/jstests/replsets/initial_sync_rename_collection.js
@@ -26,8 +26,7 @@
rst.awaitReplication();
jsTestLog('Bring up a new node');
- // TODO(SERVER-4941): Only a single initial sync attempt should be necessary.
- const secondary = rst.add({setParameter: 'numInitialSyncAttempts=3'});
+ const secondary = rst.add({setParameter: 'numInitialSyncAttempts=1'});
rst.reInitiate();
assert.eq(primary, rst.getPrimary(), 'Primary changed after reconfig');
diff --git a/jstests/replsets/initial_sync_rename_collection_unsafe.js b/jstests/replsets/initial_sync_rename_collection_unsafe.js
index a08143ba735..13e58b1503a 100644
--- a/jstests/replsets/initial_sync_rename_collection_unsafe.js
+++ b/jstests/replsets/initial_sync_rename_collection_unsafe.js
@@ -17,6 +17,7 @@
const dbName = 'd';
const primary = rst.getPrimary();
const primaryDB = primary.getDB(dbName);
+ assert.commandWorked(primary.adminCommand({setFeatureCompatibilityVersion:"3.4"}));
assert.writeOK(primaryDB['foo'].save({}));