Skip to content

Commit 1d17232

Browse files
committed
Fix more tests.
1 parent 8f33247 commit 1d17232

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

modules/module-postgres/test/src/slow_tests.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,11 +228,12 @@ bucket_definitions:
228228
await compactPromise;
229229

230230
// Wait for replication to finish
231-
let checkpoint = await getClientCheckpoint(pool, storage.factory, { timeout: TIMEOUT_MARGIN_MS });
231+
await getClientCheckpoint(pool, storage.factory, { timeout: TIMEOUT_MARGIN_MS });
232232

233233
if (f instanceof mongo_storage.storage.MongoBucketStorage) {
234234
// Check that all inserts have been deleted again
235-
const docs = await f.db.current_data.find().toArray();
235+
// Note: at this point, the pending_delete cleanup may not have run yet.
236+
const docs = await f.db.current_data.find({ pending_delete: { $exists: false } }).toArray();
236237
const transformed = docs.map((doc) => {
237238
return bson.deserialize(doc.data.buffer) as SqliteRow;
238239
});
@@ -259,6 +260,8 @@ bucket_definitions:
259260
*
260261
FROM
261262
current_data
263+
WHERE
264+
pending_delete IS NULL
262265
`
263266
.decoded(postgres_storage.models.CurrentData)
264267
.rows();

0 commit comments

Comments
 (0)