Closed mraerino closed 3 years ago
- Summary
There was a data race when adding downloads to the order while processing line items.
Fixes https://github.com/netlify/gocommerce-ci/issues/48
- Test plan
Running existing tests with -race uncovered this. Did the same to test the fix.
-race
- Description for the changelog
Fix data race in downloads gathering
- A picture of a cute animal (not mandatory but encouraged)
does the race happen because the tests run concurrently?
we process the line items in parallel here: https://github.com/netlify/gocommerce/blob/7e033edf5bf0affcbb5ed6f827442151d6c06872/api/order.go#L654-L669
- Summary
There was a data race when adding downloads to the order while processing line items.
Fixes https://github.com/netlify/gocommerce-ci/issues/48
- Test plan
Running existing tests with
-race
uncovered this. Did the same to test the fix.- Description for the changelog
Fix data race in downloads gathering
- A picture of a cute animal (not mandatory but encouraged)