summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVesselina Ratcheva <vesselina.ratcheva@10gen.com>2018-02-22 13:23:48 -0500
committerVesselina Ratcheva <vesselina.ratcheva@10gen.com>2018-02-23 10:35:08 -0500
commit04cc084048a5f37c9d10ee3bac9dbef1e89672c5 (patch)
tree24c725b7a38420c3f61d97e1c327e68f656d5233
parent7dbbe6c7b33135c4f1f27bcd84dcca6c711f240e (diff)
downloadmongo-04cc084048a5f37c9d10ee3bac9dbef1e89672c5.tar.gz
SERVER-33448 Relax time diff requirements in apply_batches_totalMillis.js
-rw-r--r--jstests/replsets/apply_batches_totalMillis.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/jstests/replsets/apply_batches_totalMillis.js b/jstests/replsets/apply_batches_totalMillis.js
index b20b5ec4f44..9e093211cb6 100644
--- a/jstests/replsets/apply_batches_totalMillis.js
+++ b/jstests/replsets/apply_batches_totalMillis.js
@@ -53,11 +53,11 @@
let timeAfterLarge = getTotalMillis(secondary);
let deltaLarge = timeAfterLarge - timeAfterSmall;
- // The two times should differ by a very noticeable factor.
- deltaSmall = deltaSmall || 1;
- assert(deltaLarge / deltaSmall >= 5,
- `Expected totalMillis to reflect a difference of at least 5x.
- Recorded deltas: {small: ${deltaSmall}ms, large: ${deltaLarge}ms}.`);
+ jsTestLog(`Recorded deltas: {small: ${deltaSmall}ms, large: ${deltaLarge}ms}.`);
+
+ // We should have recorded at least as much time on the second load as we did on the first.
+ // This is a crude comparison that is only taken to check that the timer is used correctly.
+ assert(deltaLarge >= deltaSmall, "Expected a higher net totalMillis for the larger load.");
rst.stopSet();
})(); \ No newline at end of file