Skip to content

Commit 07c3398

Browse files
committed
chore(run-store): apply oxfmt to the two new sweeper test files
1 parent 2267b18 commit 07c3398

2 files changed

Lines changed: 23 additions & 17 deletions

File tree

internal-packages/run-store/src/snapshotOrphanSweeper.cluster.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ describe("scanTargetsOf", () => {
6868
let generation = 0;
6969
(cluster as unknown as { nodes: () => Redis[] }).nodes = () => {
7070
generation += 1;
71-
return Array.from({ length: generation }, (_v, i) => new Redis({ lazyConnect: true, port: 65100 + i }));
71+
return Array.from(
72+
{ length: generation },
73+
(_v, i) => new Redis({ lazyConnect: true, port: 65100 + i })
74+
);
7275
};
7376

7477
expect(scanTargetsOf(cluster)).toHaveLength(1);

internal-packages/run-store/src/snapshotOrphanSweeper.confirm.test.ts

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -301,25 +301,28 @@ describe("a run seen alive clears its marker", () => {
301301
});
302302

303303
describe("a pass can stop inside a budget", () => {
304-
containerTest("an already-passed deadline yields a partial pass", async ({ prisma, redisOptions }) => {
305-
const runStore = new PostgresRunStore({ prisma, readOnlyPrisma: prisma });
306-
const sweeper = new SnapshotOrphanSweeper({
307-
redisOptions,
308-
runStore: runStore as unknown as RunStore,
309-
completedTtlMs: COMPLETED_TTL_MS,
310-
});
304+
containerTest(
305+
"an already-passed deadline yields a partial pass",
306+
async ({ prisma, redisOptions }) => {
307+
const runStore = new PostgresRunStore({ prisma, readOnlyPrisma: prisma });
308+
const sweeper = new SnapshotOrphanSweeper({
309+
redisOptions,
310+
runStore: runStore as unknown as RunStore,
311+
completedTtlMs: COMPLETED_TTL_MS,
312+
});
311313

312-
try {
313-
const result = await sweeper.sweep({ deadline: Date.now() - 1 });
314+
try {
315+
const result = await sweeper.sweep({ deadline: Date.now() - 1 });
314316

315-
// redis-worker redelivers a job that outlives its visibility timeout, and nothing extends it,
316-
// so a pass that cannot stop on its own runs concurrently with itself.
317-
expect(result.partial).toBe(true);
318-
expect(result.scanned).toBe(0);
319-
} finally {
320-
await sweeper.quit();
317+
// redis-worker redelivers a job that outlives its visibility timeout, and nothing extends it,
318+
// so a pass that cannot stop on its own runs concurrently with itself.
319+
expect(result.partial).toBe(true);
320+
expect(result.scanned).toBe(0);
321+
} finally {
322+
await sweeper.quit();
323+
}
321324
}
322-
});
325+
);
323326

324327
containerTest("an aborted signal yields a partial pass", async ({ prisma, redisOptions }) => {
325328
const runStore = new PostgresRunStore({ prisma, readOnlyPrisma: prisma });

0 commit comments

Comments
 (0)