diff options
author | Cheahuychou Mao <cheahuychou.mao@mongodb.com> | 2019-10-25 19:08:50 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-10-25 19:08:50 +0000 |
commit | 8fc28f0773ca1efb0a43cc5590b9ca8b9e50559e (patch) | |
tree | b4c8dc05588e3dfb408cbf288c4d4389024008f4 /jstests/replsets/rslib.js | |
parent | 99d90208c67351469dae5983ed233638e61cf732 (diff) | |
download | mongo-8fc28f0773ca1efb0a43cc5590b9ca8b9e50559e.tar.gz |
SERVER-39165 Add waitForFailpoint command and update other repl tests
Diffstat (limited to 'jstests/replsets/rslib.js')
-rw-r--r-- | jstests/replsets/rslib.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/jstests/replsets/rslib.js b/jstests/replsets/rslib.js index 06bb6680df9..0182c3e5574 100644 --- a/jstests/replsets/rslib.js +++ b/jstests/replsets/rslib.js @@ -492,12 +492,15 @@ stopReplicationAndEnforceNewPrimaryToCatchUp = function(rst, node) { }; /** - * Sets the specified failpoint to 'alwaysOn' on the node. + * Sets the specified failpoint to 'alwaysOn' on the node and returns the number of + * times the fail point has been entered so far. */ setFailPoint = function(node, failpoint, data = {}) { jsTestLog("Setting fail point " + failpoint); - assert.commandWorked( - node.adminCommand({configureFailPoint: failpoint, mode: "alwaysOn", data})); + let configureFailPointRes = + node.adminCommand({configureFailPoint: failpoint, mode: "alwaysOn", data: data}); + assert.commandWorked(configureFailPointRes); + return configureFailPointRes.count; }; /** |