|
In abort_transaction_thread_does_not_block_on_locks.js when a "find" does not return an ExceededTimeLimit error as expected, the test will fail. It is unclear whether the command succeeded or whether the command failed with a different error code.
I would expect something like the code below, which would immediately fail the test if any other error code caused the command to fail.
assert.soon(function() {
|
// Wait for the drop to have a pending MODE_X lock on the database, which will block
|
// MODE_IS lock requests behind it.
|
let res = testDB.runCommand({find: collName, maxTimeMS: 100});
|
if (res.code == ErrorCodes.ExceededTimeLimit) {
|
return true;
|
}
|
assert.commandWorked(res);
|
return false;
|
});
|
|