Skip to content

Commit fcebbf8

Browse files
committed
improve test
1 parent f4d7f5a commit fcebbf8

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

packages/gcp-pubsub/test/consumers/PubSubPermissionConsumer.subscriptionRetry.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,10 @@ describe('PubSubPermissionConsumer - Subscription Retry', () => {
376376
})
377377

378378
// Create subscription after a delay (simulating eventual consistency)
379-
globalThis.setTimeout(async () => {
380-
await topic.createSubscription(SUBSCRIPTION_NAME)
379+
globalThis.setTimeout(() => {
380+
topic.createSubscription(SUBSCRIPTION_NAME).catch((err) => {
381+
expect.unreachable(`Failed to create subscription in delayed callback: ${err}`)
382+
})
381383
}, 1500)
382384

383385
try {

0 commit comments

Comments
 (0)