diff --git a/internal/internal_workflow_testsuite_test.go b/internal/internal_workflow_testsuite_test.go index b06e902b1..7e32d9f49 100644 --- a/internal/internal_workflow_testsuite_test.go +++ b/internal/internal_workflow_testsuite_test.go @@ -1856,7 +1856,9 @@ func (s *WorkflowTestSuiteUnitTest) Test_WorkflowLocalActivityWithMockAndListene env.ExecuteWorkflow(workflowFn) env.AssertExpectations(s.T()) - s.Equal(2, startedCount) + // the canceled workflow may not have actually started by the time it was canceled + s.GreaterOrEqual(1, startedCount) + s.LessOrEqual(2, startedCount) s.Equal(1, completedCount) s.Equal(1, canceledCount) s.True(env.IsWorkflowCompleted())