summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/current_op_reports_validation_io.js
diff options
context:
space:
mode:
authorIvan Fefer <ivan.fefer@mongodb.com>2022-10-07 07:29:29 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-10-07 08:02:46 +0000
commit27e71f251ee6a2136d10b895c72391f9c5a12d59 (patch)
treeb0f7c3466f6ca7a22e3f7639898df78ce460f269 /jstests/noPassthrough/current_op_reports_validation_io.js
parent0406b63884d9993f0eafd7d6dcd680e0ecdc1a1f (diff)
downloadmongo-27e71f251ee6a2136d10b895c72391f9c5a12d59.tar.gz
SERVER-70270: Use fail_point_util.js instead of checkLog to wait for failpoint hit
Diffstat (limited to 'jstests/noPassthrough/current_op_reports_validation_io.js')
-rw-r--r--jstests/noPassthrough/current_op_reports_validation_io.js16
1 files changed, 7 insertions, 9 deletions
diff --git a/jstests/noPassthrough/current_op_reports_validation_io.js b/jstests/noPassthrough/current_op_reports_validation_io.js
index ba5aedc8b0b..944c5ad832e 100644
--- a/jstests/noPassthrough/current_op_reports_validation_io.js
+++ b/jstests/noPassthrough/current_op_reports_validation_io.js
@@ -5,6 +5,8 @@
* @tags: [requires_fsync, requires_wiredtiger, requires_persistence]
*/
(function() {
+load('jstests/libs/fail_point_util.js');
+
const dbName = "test";
const collName = "currentOpValidation";
@@ -24,13 +26,11 @@ for (let i = 0; i < 5; i++) {
assert.commandWorked(db.adminCommand({setParameter: 1, maxValidateMBperSec: 1}));
// Simulate each record being 512KB.
-assert.commandWorked(db.adminCommand(
- {configureFailPoint: "fixedCursorDataSizeOf512KBForDataThrottle", mode: "alwaysOn"}));
+const cursorDataSizeFailPoint = configureFailPoint(db, "fixedCursorDataSizeOf512KBForDataThrottle");
// This fail point comes after we've traversed the record store, so currentOp should have some
// validation statistics once we hit this fail point.
-assert.commandWorked(
- db.adminCommand({configureFailPoint: "pauseCollectionValidationWithLock", mode: "alwaysOn"}));
+const pauseFailPoint = configureFailPoint(db, "pauseCollectionValidationWithLock");
// Forces a checkpoint to make the background validation see the data.
assert.commandWorked(db.adminCommand({fsync: 1}));
@@ -44,7 +44,7 @@ const awaitValidation = startParallelShell(() => {
}));
}, conn.port);
-checkLog.containsJson(conn, 20304);
+pauseFailPoint.wait();
const curOpFilter = {
'command.validate': collName
@@ -61,10 +61,8 @@ assert(curOp[0].hasOwnProperty("dataThroughputLastSecond") &&
curOp[0].hasOwnProperty("dataThroughputAverage"));
// Finish up validating the collection.
-assert.commandWorked(db.adminCommand(
- {configureFailPoint: "fixedCursorDataSizeOf512KBForDataThrottle", mode: "off"}));
-assert.commandWorked(
- db.adminCommand({configureFailPoint: "pauseCollectionValidationWithLock", mode: "off"}));
+cursorDataSizeFailPoint.off();
+pauseFailPoint.off();
// Setting this to 0 turns off the throttle.
assert.commandWorked(db.adminCommand({setParameter: 1, maxValidateMBperSec: 0}));