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

Fix time check for jstests/parallel/checkMultiThread.js

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 3.5.2
    • None
    • Testing Infrastructure
    • None
    • Minor Change
    • ALL
    • TIG 2017-01-02

    Description

      The time check in the checkMultiThread.js test is just comparing the millisecond value of the thread, it should be comparing the the total time each thread took to execute relative to the start time. This is the proposed change:

      var func = function() {
          var start = new Date();
          db.runCommand({$eval: "sleep(10000);", nolock: true});
          return new Date();
      };
       
      assert.lt(
          a.returnData() - start, 15000, "A took more than 15s");
      

      Attachments

        Activity

          People

            jonathan.abrahams Jonathan Abrahams
            jonathan.abrahams Jonathan Abrahams
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: