diff options
Diffstat (limited to 'jstests/libs')
-rw-r--r-- | jstests/libs/chunk_manipulation_util.js | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/jstests/libs/chunk_manipulation_util.js b/jstests/libs/chunk_manipulation_util.js index 60037a46c04..b1e4d5a90e1 100644 --- a/jstests/libs/chunk_manipulation_util.js +++ b/jstests/libs/chunk_manipulation_util.js @@ -197,10 +197,8 @@ function configureMigrateFailPoint( shardConnection, stepNumber, mode ) { // Wait for moveChunk to reach a step (1 through 6). // function waitForMigrateStep( shardConnection, stepNumber ) { - var migrateThreadPrefix = 'migrateThread-'; - var searchStringPrefix = 'step ' + stepNumber; - - var admin = shardConnection.getDB('admin'); + var searchString = 'step ' + stepNumber, + admin = shardConnection.getDB( 'admin' ); assert( stepNumber >= 1); assert( stepNumber <= 5 ); @@ -216,8 +214,8 @@ function waitForMigrateStep( shardConnection, stepNumber ) { var in_progress = admin.currentOp(true).inprog; for ( var i = 0; i < in_progress.length; ++i ) { var op = in_progress[i]; - if (op.desc && op.desc.startsWith(migrateThreadPrefix)) { - return op.msg.startsWith(searchStringPrefix); + if ( op.desc && op.desc === 'migrateThread' ) { + return op.msg.startsWith( searchString ); } } |