Skip to content

Commit 600a776

Browse files
committed
fix test
1 parent 6d3d364 commit 600a776

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

packages/test/src/helpers-integration.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,10 @@ export async function setActivityState(
332332
// • the activity vanished (already completed)
333333
return activityInfo ? !activityInfo.paused : true;
334334
} else {
335-
// If we are resetting, success when heartbeat
336-
// details are reset.
337-
return activityInfo?.heartbeatDetails === null;
335+
// If we are resetting, success when either
336+
// • heartbeat details have been reset OR
337+
// • the activity vanished (completed / retried)
338+
return activityInfo ? activityInfo.heartbeatDetails === null : true;
338339
}
339340
}, 15000);
340341
}

packages/test/src/test-integration-workflows.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1513,7 +1513,7 @@ test('Activity reset returns expected cancellation details', async (t) => {
15131513

15141514
await worker.runUntil(async () => {
15151515
const testActivityId = randomUUID();
1516-
const handle = await startWorkflow(heartbeatPauseWorkflow, { args: [testActivityId, true, 2] });
1516+
const handle = await startWorkflow(heartbeatPauseWorkflow, { args: [testActivityId, true, 1] });
15171517

15181518
// Wait for it to exist and heartbeat
15191519
await waitUntil(async () => {

0 commit comments

Comments
 (0)