Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-35674

Improve error logging in abort_transaction_thread_does_not_block_on_locks.js

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.1.1
    • None
    • None
    • None
    • Fully Compatible
    • ALL
    • Storage NYC 2018-07-02
    • 16

    Description

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

      Attachments

        Activity

          People

            louis.williams@mongodb.com Louis Williams
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: