diff options
author | Tess Avitabile <tess.avitabile@mongodb.com> | 2019-05-24 09:47:29 -0400 |
---|---|---|
committer | Tess Avitabile <tess.avitabile@mongodb.com> | 2019-05-24 09:47:29 -0400 |
commit | 445872c8ab7e073b67b87a56180c685b24d81d49 (patch) | |
tree | 1055f92dfe0a8a4485b7920777231686f3a997bc | |
parent | ddb5e3eb82bd8f22a384835923d7f20bfa479d24 (diff) | |
download | mongo-445872c8ab7e073b67b87a56180c685b24d81d49.tar.gz |
SERVER-41247 ReplSetTests that specify setParameter as a string must still disable periodic noop writer
-rw-r--r-- | src/mongo/shell/replsettest.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mongo/shell/replsettest.js b/src/mongo/shell/replsettest.js index ffa2ba9875c..31729b95d64 100644 --- a/src/mongo/shell/replsettest.js +++ b/src/mongo/shell/replsettest.js @@ -2277,7 +2277,17 @@ var ReplSetTest = function(opts) { // Turn off periodic noop writes for replica sets by default. options.setParameter = options.setParameter || {}; + if (typeof(options.setParameter) === "string") { + var eqIdx = options.setParameter.indexOf("="); + if (eqIdx != -1) { + var param = options.setParameter.substring(0, eqIdx); + var value = options.setParameter.substring(eqIdx + 1); + options.setParameter = {}; + options.setParameter[param] = value; + } + } options.setParameter.writePeriodicNoops = options.setParameter.writePeriodicNoops || false; + options.setParameter.numInitialSyncAttempts = options.setParameter.numInitialSyncAttempts || 1; // We raise the number of initial sync connect attempts for tests that disallow chaining. |