summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMickey. J Winters <mickey.winters@mongodb.com>2022-09-20 14:19:14 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-09-20 14:55:25 +0000
commit0da3dac395ace03613f6073fff40f49fb84dc707 (patch)
tree614abb8502471f3931bb8f873f01e28e531f9efb
parent6ef16f7c62852a9ed9bba31dfad7f9c80deb2067 (diff)
downloadmongo-0da3dac395ace03613f6073fff40f49fb84dc707.tar.gz
SERVER-69785 robustify change_streams_per_shard_cursor.js
(cherry-picked from 1219ff764c932f16a68c7ba1afd9b925f9f876c8)
-rw-r--r--jstests/noPassthrough/change_streams_per_shard_cursor.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/jstests/noPassthrough/change_streams_per_shard_cursor.js b/jstests/noPassthrough/change_streams_per_shard_cursor.js
index bece83e65c7..dcd56fc80e9 100644
--- a/jstests/noPassthrough/change_streams_per_shard_cursor.js
+++ b/jstests/noPassthrough/change_streams_per_shard_cursor.js
@@ -98,7 +98,7 @@ let c = pscWatch(sdb, "coll", shardId);
for (let i = 1; i <= 4; i++) {
sdb.coll.insertOne({location: 2, i});
assert(!c.isExhausted());
- assert(c.hasNext());
+ assert.soon(() => c.hasNext());
c.next();
}
assert(!c.hasNext());
@@ -108,12 +108,12 @@ c = pscWatch(sdb, 1, shardId);
sdb.coll.insertOne({location: 3});
assert(!c.isExhausted());
-assert(c.hasNext());
+assert.soon(() => c.hasNext());
c.next();
sdb.coll2.insertOne({location: 4});
assert(!c.isExhausted());
-assert(c.hasNext());
+assert.soon(() => c.hasNext());
c.next();
assert(!c.hasNext());
@@ -129,7 +129,7 @@ assert(!c.hasNext());
sdb.toBeCreated.insertOne({location: 8});
assert(!c.isExhausted());
-assert(c.hasNext());
+assert.soon(() => c.hasNext());
c.next();
assert(!c.hasNext());
@@ -164,7 +164,7 @@ c = pscWatch(sdb, "coll", shardId);
sdb.coll.insertOne({location: 5, _id: -2});
assert(!c.isExhausted());
-assert(c.hasNext());
+assert.soon(() => c.hasNext());
c.next();
sdb.coll.insertOne({location: 6, _id: 2});
@@ -176,12 +176,12 @@ c = pscWatch(sdb.getSiblingDB("admin"), 1, shardId, {}, {allChangesForCluster: t
sdb.coll.insertOne({location: 7, _id: -3});
assert(!c.isExhausted());
-assert(c.hasNext());
+assert.soon(() => c.hasNext());
c.next();
sdb.coll2.insertOne({location: 8, _id: -4});
assert(!c.isExhausted());
-assert(c.hasNext());
+assert.soon(() => c.hasNext());
c.next();
sdb.coll.insertOne({location: 9, _id: 3});