diff --git a/internal/internal_workflow_testsuite.go b/internal/internal_workflow_testsuite.go index 7cbf77552..54ca4a069 100644 --- a/internal/internal_workflow_testsuite.go +++ b/internal/internal_workflow_testsuite.go @@ -1412,6 +1412,8 @@ func (env *testWorkflowEnvironmentImpl) getActivityHandle(activityID, runID stri } func (env *testWorkflowEnvironmentImpl) setActivityHandle(activityID, runID string, handle *testActivityHandle) { + env.locker.Lock() + defer env.locker.Unlock() env.activities[env.makeUniqueActivityID(activityID, runID)] = handle }