src-cli icon indicating copy to clipboard operation
src-cli copied to clipboard

Data race between test and source code

Open bahrmichael opened this issue 3 months ago • 7 comments

See https://github.com/sourcegraph/src-cli/pull/1079 for an example.

Run go test -race ./... on main to reproduce.

The data race seems to come from tests using reflection for mocking, and production code doing other stuff. There appears to be no data race within the production code, only between test and production code.

I traced the first occurrence back to https://github.com/sourcegraph/src-cli/commit/ad1b36ada775f09561eb708657f447c3c7754433#diff-0a603732f0f49068408f58001aca08acd789cc8f3c1abb75db951824fe681ca5.

bahrmichael avatar May 12 '24 09:05 bahrmichael