Skip to content

Commit f3db25b

Browse files
committed
feat: all fixes for tests
1 parent b8ec5fc commit f3db25b

5 files changed

Lines changed: 256 additions & 210 deletions

File tree

.claude/settings.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
"Bash(grep -r ThemeProvider /home/ljtwp/Desktop/drips/niff/frontend/src/ --include=*.tsx --include=*.ts -l)",
1111
"Bash(grep -n \"toast\\\\|useToast\" /home/ljtwp/Desktop/drips/niff/frontend/src/app/policy/[id]/claim/page.tsx)",
1212
"Bash(git -C /home/ljtwp/Desktop/drips/niff add frontend/package-lock.json)",
13-
"Bash(git -C /home/ljtwp/Desktop/drips/niff status --short)"
13+
"Bash(git -C /home/ljtwp/Desktop/drips/niff status --short)",
14+
"Bash(npm audit:*)",
15+
"Bash(echo \"EXIT:$?\")"
1416
]
1517
}
1618
}

backend/src/redis/client.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ export function getRedisClient(): Redis {
8080
? () => null
8181
: (times: number) => Math.min(times * 200, 10_000),
8282
lazyConnect: true,
83-
enableOfflineQueue: false, // surface errors immediately rather than queuing
83+
// enableOfflineQueue defaults to true: commands issued before the lazy
84+
// connection is established are queued rather than rejected immediately.
85+
// Without this, the first cacheSet/cacheGet pair silently fails.
8486
});
8587

8688
_client.on("error", (err: Error) => {
@@ -114,14 +116,15 @@ export function getRedisClient(): Redis {
114116
*/
115117
export function getBullMQConnection(): Redis {
116118
const cfg = buildRedisConfig();
119+
// Note: BullMQ explicitly rejects ioredis `keyPrefix` — do not pass it here.
120+
// Use BullMQ's own `prefix` option on Queue/Worker constructors if needed.
117121
return new Redis({
118122
host: cfg.host,
119123
port: cfg.port,
120124
password: cfg.password,
121125
tls: cfg.tls ? {} : undefined,
122126
db: cfg.db,
123-
keyPrefix: cfg.keyPrefix,
124-
maxRetriesPerRequest: null,
127+
maxRetriesPerRequest: null, // required by BullMQ for blocking commands
125128
retryStrategy: (times: number) => Math.min(times * 200, 10_000),
126129
enableOfflineQueue: false,
127130
});

frontend/next-env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3+
/// <reference path="./.next/types/routes.d.ts" />
34

45
// NOTE: This file should not be edited
56
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

0 commit comments

Comments
 (0)