Fix time check for jstests/parallel/checkMultiThread.js

XMLWordPrintableJSON

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

      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 (Inactive)
            Reporter:
            Jonathan Abrahams (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: