[SERVER-30863] Make benchrun_substitution.js more robust Created: 28/Aug/17  Updated: 30/Oct/23  Resolved: 05/Sep/17

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 3.5.13

Type: Improvement Priority: Major - P3
Reporter: James Wahlin Assignee: Tess Avitabile (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Sprint: Query 2017-09-11
Participants:
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
}



 Comments   
Comment by Githook User [ 05/Sep/17 ]

Author:

{'username': 'tessavitabile', 'name': 'Tess Avitabile', 'email': 'tess.avitabile@mongodb.com'}

Message: SERVER-30863 Make benchrun_substitution.js more robust
Branch: master
https://github.com/mongodb/mongo/commit/b505a70cc41564ef3422fa744a47822c2efe27aa

Generated at Thu Feb 08 04:25:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.