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

Make benchrun_substitution.js more robust

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.13
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • Query 2017-09-11
    • 0

      This test relies on being able to do enough remove operations within 10 seconds. We should make the assertion made more forgiving on slow machines.

      function benchrun_sub_remove(use_write_command) {
          t = db.benchrun_sub;
          t.drop();
      
          ops = [{
              op: "remove",
              ns: "test.benchrun_sub",
              query: {x: {"#RAND_INT": [0, 100]}},
              writeCmd: use_write_command,
          }];
      
          for (var i = 0; i < 100; ++i) {
              t.insert({x: i});
          }
      
          res = benchRun({parallel: 1, seconds: 10, ops: ops, host: db.getMongo().host});
      
          assert.eq(t.count(), 0);
      }
      

            Assignee:
            tess.avitabile@mongodb.com Tess Avitabile (Inactive)
            Reporter:
            james.wahlin@mongodb.com James Wahlin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: