@@ -301,25 +301,28 @@ describe("a run seen alive clears its marker", () => {
301301} ) ;
302302
303303describe ( "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