summaryrefslogtreecommitdiff
path: root/jstests/noPassthroughWithMongod
diff options
context:
space:
mode:
authorDan Pasette <dan@10gen.com>2015-10-12 15:54:50 -0400
committerDan Pasette <dan@mongodb.com>2015-10-12 15:56:32 -0400
commite05b3f2dfce653d77e986cd0bce40add19d66907 (patch)
tree9a017bc42c70dc1dad7dfa72c043e6b7a4f65713 /jstests/noPassthroughWithMongod
parent4b71fa950fb478d7d5e8c00ad9ec0292df5a6177 (diff)
downloadmongo-e05b3f2dfce653d77e986cd0bce40add19d66907.tar.gz
SERVER-20837 remove timing-dependent assertions from CUR_DATE test
Diffstat (limited to 'jstests/noPassthroughWithMongod')
-rw-r--r--jstests/noPassthroughWithMongod/benchrun_substitution.js10
1 files changed, 2 insertions, 8 deletions
diff --git a/jstests/noPassthroughWithMongod/benchrun_substitution.js b/jstests/noPassthroughWithMongod/benchrun_substitution.js
index af1aba6c8a3..520613bcdc8 100644
--- a/jstests/noPassthroughWithMongod/benchrun_substitution.js
+++ b/jstests/noPassthroughWithMongod/benchrun_substitution.js
@@ -17,18 +17,12 @@ function benchrun_sub_insert(use_write_command) {
assert.gt(res.insert, 0);
- var now = new Date();
t.find().forEach(function(doc) {
var field = doc.x;
assert.gte(field, 0);
assert.lt(field, 100);
- var curDate = doc.curDate;
- assert.lte(curDate, now);
- var futureDate = doc.futureDate;
- assert.gt(futureDate, curDate);
- assert.gte(new Date(now.getTime() + offset), futureDate);
- var pastDate = doc.pastDate;
- assert.lte(pastDate, new Date(now.getTime() - offset));
+ assert.lt(doc.pastDate, doc.curDate);
+ assert.lt(doc.curDate, doc.futureDate);
}
);
}