Skip to content

Commit 8516b76

Browse files
committed
fix test
1 parent e1261cf commit 8516b76

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
@@ -321,9 +321,10 @@ export async function setActivityState(
321321
// • the activity vanished (already completed)
322322
return activityInfo ? !activityInfo.paused : true;
323323
} else {
324-
// If we are resetting, success when heartbeat
325-
// details are reset.
326-
return activityInfo?.heartbeatDetails === null;
324+
// If we are resetting, success when either
325+
// • heartbeat details have been reset OR
326+
// • the activity vanished (completed / retried)
327+
return activityInfo ? activityInfo.heartbeatDetails === null : true;
327328
}
328329
}, 15000);
329330
}

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)