-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fatal error: concurrent map writes when u #1703
Comments
protect the write to the map env.activities with env.locker
To clarify, are you seeing this data race when the same test environment being shared by multiple tests? |
all tests are run in parallel. Here is an example of how I write a test
Do you mean that the line |
Sorry for the late reply this slipped through the cracks ,
Yes, The test environment should not be shared for multiple tests. Each test should have its own environment |
Expected Behavior
Actual Behavior
when testing several Activities with t.Parallel, the test framework crash with "fatal error: concurrent map writes"
Steps to Reproduce the Problem
Specifications
Investigation
code:
as several go routines can write in the map 'activities', the type of activities should be a sync.Map or use a mutex to protect the write
Potential fix
internal/internal_workflow_testsuite.go:1415
The text was updated successfully, but these errors were encountered: