Skip to content

Commit 59d3f3d

Browse files
committed
Improved the checkpointResumer test task
1 parent 9d186dd commit 59d3f3d

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

references/v3-catalog/src/trigger/checkpoints.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,16 @@ export const checkpointBatchResumer = task({
1818
/** Test that checkpoints and resuming works if the checkpoint isn't created before the resume */
1919
export const checkpointResumer = task({
2020
id: "checkpoint-resume",
21+
queue: {
22+
concurrencyLimit: 1,
23+
},
2124
run: async ({ count = 1 }: Payload) => {
22-
await noop.triggerAndWait();
23-
logger.info(`Successfully 1/3 resumed`);
24-
await noop.triggerAndWait();
25-
logger.info(`Successfully 2/3 resumed`);
26-
await noop.triggerAndWait();
27-
logger.info(`Successfully 3/3 resumed`);
25+
logger.info(`Starting ${count} runs`);
26+
27+
for (let i = 0; i < count; i++) {
28+
await noop.triggerAndWait();
29+
logger.info(`Successfully ${i + 1}/${count} resumed`);
30+
}
2831
},
2932
});
3033

0 commit comments

Comments
 (0)