File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
modules/module-postgres/test/src Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff 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 ( ) ;
You can’t perform that action at this time.
0 commit comments