File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
modules/module-postgres/test/src Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -328,8 +328,18 @@ bucket_definitions:
328328 // In the service, this error is handled in WalStreamReplicationJob,
329329 // creating a new replication slot.
330330 await expect ( async ( ) => {
331- await context . replicateSnapshot ( ) ;
332- await context . getCheckpoint ( ) ;
331+ try {
332+ await context . replicateSnapshot ( ) ;
333+ await context . getCheckpoint ( ) ;
334+ } catch ( e ) {
335+ // replicateSnapshot can have a ReplicationAbortedError(cause: MissingReplicationSlotError).
336+ // This is specific to tests - real replication will get the MissingReplicationSlotError directly.
337+ if ( e ?. cause ) {
338+ throw e . cause ;
339+ } else {
340+ throw e ;
341+ }
342+ }
333343 } ) . rejects . toThrowError ( MissingReplicationSlotError ) ;
334344 }
335345 }
You can’t perform that action at this time.
0 commit comments