Skip to content

Commit b9f314e

Browse files
committed
test(redis-worker): stabilize shutdown timer assertion
1 parent 315241e commit b9f314e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/redis-worker/src/worker.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,6 @@ describe("Worker", () => {
577577
await observer.ping();
578578

579579
const baselineConnections = await connectedClientCount(observer);
580-
const baselineTimeouts = activeTimeoutCount();
581580
const worker = new Worker({
582581
name: "shutdown-lifecycle-worker",
583582
redisOptions,
@@ -604,6 +603,7 @@ describe("Worker", () => {
604603

605604
// Let the worker enter its polling loop so the loop, rather than the deadline, wins shutdown.
606605
await new Promise((resolve) => setTimeout(resolve, 50));
606+
const baselineTimeouts = activeTimeoutCount();
607607
await worker.stop();
608608

609609
await expect.poll(() => connectedClientCount(observer)).toBe(baselineConnections);

0 commit comments

Comments
 (0)