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

Make benchrun_substitution.js more robust

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.5.13
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Query 2017-09-11
    • Linked BF Score:
      0

      Description

      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.

      56
      function benchrun_sub_remove(use_write_command) {
      57
          t = db.benchrun_sub;
      58
          t.drop();
      59
       
      60
          ops = [{
      61
              op: "remove",
      62
              ns: "test.benchrun_sub",
      63
              query: {x: {"#RAND_INT": [0, 100]}},
      64
              writeCmd: use_write_command,
      65
          }];
      66
       
      67
          for (var i = 0; i < 100; ++i) {
      68
              t.insert({x: i});
      69
          }
      70
       
      71
          res = benchRun({parallel: 1, seconds: 10, ops: ops, host: db.getMongo().host});
      72
       
      73
          assert.eq(t.count(), 0);
      74
      }
      

        Attachments

          Activity

            People

            Assignee:
            tess.avitabile Tess Avitabile
            Reporter:
            james.wahlin James Wahlin
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: