0034a98eb1
These tests were made parallel to speed up the execution, but this turned out to be flaky, because they mutate some shared state. The tests use shared `storage` variable without any synchronization. However, adding synchronization is not enough in all cases, some tests register the same plugin, so they can't be run in parallel to each other. This commit adds the synchronization around `storage` variable modification and removes parallel from the tests where it's not enough. Before: ``` $ go test -race -v . -count 1 ... --- FAIL: TestGet (15.02s) --- FAIL: TestGet/not_implemented (0.00s) testing.go:1446: race detected during execution of test testing.go:1446: race detected during execution of test FAIL FAIL github.com/docker/docker/pkg/plugins 17.655s FAIL ``` After: ``` $ go test -race -v . -count 1 ok github.com/docker/docker/pkg/plugins 32.702s ``` Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com> |
||
---|---|---|
.. | ||
pluginrpc-gen | ||
transport | ||
client.go | ||
client_test.go | ||
discovery.go | ||
discovery_test.go | ||
discovery_unix.go | ||
discovery_unix_test.go | ||
discovery_windows.go | ||
errors.go | ||
plugin_test.go | ||
plugins.go |