Skip to content

Commit fac6ee6

Browse files
github-managerclaude
andcommitted
fix: guard Redis disconnect and increase AfterAll timeout
Redis client may not be connected when rate limits are disabled in tests, causing disconnect() to throw ClientClosedError. Guard with isOpen check. Also raise AfterAll timeout to 30s to allow server and DB to shut down. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent c0d5e95 commit fac6ee6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/integration/features/shared.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ BeforeAll({ timeout: 1000 }, async function () {
5757
worker.run()
5858
})
5959

60-
AfterAll(async function() {
60+
AfterAll({ timeout: 30000 }, async function() {
6161
await new Promise<void>((resolve) => {
6262
worker.close(async () => {
6363
await Promise.all([
64-
cacheClient.disconnect(),
64+
cacheClient.isOpen ? cacheClient.disconnect() : Promise.resolve(),
6565
dbClient.destroy(),
6666
rrDbClient.destroy(),
6767
])

0 commit comments

Comments
 (0)