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

Fix time check for jstests/parallel/checkMultiThread.js

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.2
    • Affects Version/s: None
    • Component/s: Testing Infrastructure
    • None
    • Minor Change
    • ALL
    • TIG 2017-01-02

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

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

              Created:
              Updated:
              Resolved: