Skip to content

Commit 3b09903

Browse files
committed
chore: satisfy oxfmt on the lagging-replica helper and repro test
1 parent a80466a commit 3b09903

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

internal-packages/run-store/src/checkpointBatchReplicaLag.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,10 @@ describe("checkpoint WAIT_FOR_BATCH under replica lag", () => {
8181
expect(staleBatch.resumedAt).toBeNull();
8282

8383
// The batch completes and resumes the parent: primary now has resumedAt set...
84-
await prisma.batchTaskRun.update({ where: { id: batch.id }, data: { resumedAt: new Date() } });
84+
await prisma.batchTaskRun.update({
85+
where: { id: batch.id },
86+
data: { resumedAt: new Date() },
87+
});
8588

8689
// ...but the replica lags, frozen at the pre-resume snapshot.
8790
const replica = laggingReplica(prisma, [

internal-packages/testcontainers/src/laggingReplica.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ export function laggingReplica<C extends object>(
4545
if (prop === "findMany") return [];
4646
if (prop === "count") return 0;
4747
if (prop === "findFirstOrThrow" || prop === "findUniqueOrThrow") {
48-
throw new Error(`laggingReplica: ${modelName}.${prop} - row not visible on replica yet`);
48+
throw new Error(
49+
`laggingReplica: ${modelName}.${prop} - row not visible on replica yet`
50+
);
4951
}
5052
return null;
5153
}
@@ -60,7 +62,9 @@ export function laggingReplica<C extends object>(
6062
};
6163
}
6264
const value = (target as Record<string | symbol, unknown>)[prop];
63-
return typeof value === "function" ? (value as (...a: unknown[]) => unknown).bind(target) : value;
65+
return typeof value === "function"
66+
? (value as (...a: unknown[]) => unknown).bind(target)
67+
: value;
6468
},
6569
});
6670

@@ -72,7 +76,9 @@ export function laggingReplica<C extends object>(
7276
return makeModelProxy(prop as string, delegate, cfg);
7377
}
7478
const value = (target as Record<string | symbol, unknown>)[prop];
75-
return typeof value === "function" ? (value as (...a: unknown[]) => unknown).bind(target) : value;
79+
return typeof value === "function"
80+
? (value as (...a: unknown[]) => unknown).bind(target)
81+
: value;
7682
},
7783
}) as C;
7884

0 commit comments

Comments
 (0)