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> |
||
---|---|---|
.. | ||
aaparser | ||
archive | ||
authorization | ||
broadcaster | ||
capabilities | ||
chrootarchive | ||
containerfs | ||
directory | ||
dmesg | ||
fileutils | ||
homedir | ||
idtools | ||
ioutils | ||
jsonmessage | ||
longpath | ||
loopback | ||
meminfo | ||
namesgenerator | ||
parsers | ||
pidfile | ||
platform | ||
platforms | ||
plugingetter | ||
plugins | ||
pools | ||
process | ||
progress | ||
reexec | ||
rootless | ||
stack | ||
stdcopy | ||
streamformatter | ||
stringid | ||
sysinfo | ||
system | ||
tailfile | ||
tarsum | ||
useragent | ||
README.md |
pkg/ is a collection of utility packages used by the Moby project without being specific to its internals.
Utility packages are kept separate from the moby core codebase to keep it as small and concise as possible. If some utilities grow larger and their APIs stabilize, they may be moved to their own repository under the Moby organization, to facilitate re-use by other projects. However that is not the priority.
The directory pkg
is named after the same directory in the camlistore project. Since Brad is a core
Go maintainer, we thought it made sense to copy his methods for organizing Go code :) Thanks Brad!
Because utility packages are small and neatly separated from the rest of the codebase, they are a good place to start for aspiring maintainers and contributors. Get in touch if you want to help maintain them!