summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/timeseries_ttl.js
diff options
context:
space:
mode:
authorYu Jin Kang Park <yujin.kang@mongodb.com>2023-01-31 09:28:26 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-01-31 10:04:52 +0000
commit61c3feb5d0da0695dbff46554ad3e1dc68a59352 (patch)
tree7b04007a5d06a0708d5b90fb525e308addb7b1aa /jstests/noPassthrough/timeseries_ttl.js
parent61c1c2e9660b3d6b9fc05f0906109bcdb556c67e (diff)
downloadmongo-61c3feb5d0da0695dbff46554ad3e1dc68a59352.tar.gz
SERVER-67111 clustered_cappted_utils.js fix TTL deletes not visible with majority writeconcern
Diffstat (limited to 'jstests/noPassthrough/timeseries_ttl.js')
-rw-r--r--jstests/noPassthrough/timeseries_ttl.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/jstests/noPassthrough/timeseries_ttl.js b/jstests/noPassthrough/timeseries_ttl.js
index ebc2cb272f6..087bcd15c21 100644
--- a/jstests/noPassthrough/timeseries_ttl.js
+++ b/jstests/noPassthrough/timeseries_ttl.js
@@ -11,6 +11,7 @@
(function() {
"use strict";
load("jstests/libs/clustered_collections/clustered_collection_util.js");
+load("jstests/libs/ttl_util.js");
// Run TTL monitor constantly to speed up this test.
const conn = MongoRunner.runMongod({setParameter: 'ttlMonitorSleepSecs=1'});
@@ -50,7 +51,7 @@ testCase((coll, bucketsColl) => {
assert.eq(2, coll.find().itcount());
assert.eq(1, bucketsColl.find().itcount());
- ClusteredCollectionUtil.waitForTTL(coll.getDB("test"));
+ TTLUtil.waitForPass(coll.getDB("test"));
assert.eq(2, coll.find().itcount());
assert.eq(1, bucketsColl.find().itcount());
});
@@ -67,7 +68,7 @@ testCase((coll, bucketsColl) => {
assert.eq(2, coll.find().itcount());
assert.eq(1, bucketsColl.find().itcount());
- ClusteredCollectionUtil.waitForTTL(coll.getDB("test"));
+ TTLUtil.waitForPass(coll.getDB("test"));
assert.eq(2, coll.find().itcount());
assert.eq(1, bucketsColl.find().itcount());
});
@@ -81,7 +82,7 @@ testCase((coll, bucketsColl) => {
assert.commandWorked(coll.insert({[timeFieldName]: minTime, [metaFieldName]: "localhost"}));
assert.commandWorked(coll.insert({[timeFieldName]: maxTime, [metaFieldName]: "localhost"}));
- ClusteredCollectionUtil.waitForTTL(coll.getDB("test"));
+ TTLUtil.waitForPass(coll.getDB("test"));
assert.eq(0, coll.find().itcount());
assert.eq(0, bucketsColl.find().itcount());
});
@@ -100,7 +101,7 @@ testCase((coll, bucketsColl) => {
assert.eq(2, coll.find().itcount());
assert.eq(1, bucketsColl.find().itcount());
- ClusteredCollectionUtil.waitForTTL(coll.getDB("test"));
+ TTLUtil.waitForPass(coll.getDB("test"));
assert.eq(2, coll.find().itcount());
assert.eq(1, bucketsColl.find().itcount());
});
@@ -116,7 +117,7 @@ testCase((coll, bucketsColl) => {
{[timeFieldName]: maxTime, [metaFieldName]: "localhost"}
]));
- ClusteredCollectionUtil.waitForTTL(coll.getDB("test"));
+ TTLUtil.waitForPass(coll.getDB("test"));
assert.eq(0, coll.find().itcount());
assert.eq(0, bucketsColl.find().itcount());
});
@@ -149,7 +150,7 @@ testCase((coll, bucketsColl) => {
expireAfterSeconds: expireAfterSeconds,
}));
- ClusteredCollectionUtil.waitForTTL(coll.getDB("test"));
+ TTLUtil.waitForPass(coll.getDB("test"));
assert.eq(0, coll.find().itcount());
assert.eq(0, bucketsColl.find().itcount());
})();