Improve error logging in abort_transaction_thread_does_not_block_on_locks.js

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.1.1
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Storage NYC 2018-07-02
    • 16
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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;
      });
      

            Assignee:
            Louis Williams
            Reporter:
            Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: