We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a6a5ae commit d45c212Copy full SHA for d45c212
modules/module-postgres/test/src/wal_stream.test.ts
@@ -381,7 +381,17 @@ bucket_definitions:
381
// The error is handled on a higher level, which triggers
382
// creating a new replication slot.
383
await expect(async () => {
384
- await context.replicateSnapshot();
+ try {
385
+ await context.replicateSnapshot();
386
+ } catch (e) {
387
+ // replicateSnapshot can have a ReplicationAbortedError(cause: MissingReplicationSlotError).
388
+ // This is specific to tests - real replication will get the MissingReplicationSlotError directly.
389
+ if (e?.cause) {
390
+ throw e.cause;
391
+ } else {
392
+ throw e;
393
+ }
394
395
}).rejects.toThrowError(MissingReplicationSlotError);
396
}
397
});
0 commit comments