diff options
Diffstat (limited to 'src/mongo/shell/replsettest.js')
-rw-r--r-- | src/mongo/shell/replsettest.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/shell/replsettest.js b/src/mongo/shell/replsettest.js index 5634ba016a8..570ef6d13c2 100644 --- a/src/mongo/shell/replsettest.js +++ b/src/mongo/shell/replsettest.js @@ -915,8 +915,7 @@ var ReplSetTest = function(opts) { } // If restarting a node, use its existing options as the defaults. - options.restart = options.restart || restart; - if (options.restart) { + if ((options && options.restart) || restart) { options = Object.merge(this.nodes[n].fullOptions, options); } else { options = Object.merge(defaults, options); @@ -924,6 +923,8 @@ var ReplSetTest = function(opts) { options = Object.merge(options, this.nodeOptions["n" + n]); delete options.rsConfig; + options.restart = options.restart || restart; + var pathOpts = {node: n, set: this.name}; options.pathOpts = Object.merge(options.pathOpts || {}, pathOpts); |