Don't mix t.Parallel() wth environment.ProtectAll()
`testEnv` is a package-level variable, so protecting / restoring `testEnv` in parallel will result in "concurrent map write" errors. This patch removes `t.Parallel()` from tests that use this functionality (through `defer setupTest(t)()`). Note that _subtests_ can still be run in parallel, as the defer will be called after all subtests have completed. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
3f7898cfcd
commit
4d88a95d67
2 changed files with 1 additions and 3 deletions
|
@ -25,7 +25,7 @@ import (
|
|||
func TestBuildWithRemoveAndForceRemove(t *testing.T) {
|
||||
skip.If(t, testEnv.DaemonInfo.OSType == "windows", "FIXME")
|
||||
defer setupTest(t)()
|
||||
t.Parallel()
|
||||
|
||||
cases := []struct {
|
||||
name string
|
||||
dockerfile string
|
||||
|
|
|
@ -67,8 +67,6 @@ func TestUpdateMemory(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestUpdateCPUQuota(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
defer setupTest(t)()
|
||||
client := request.NewAPIClient(t)
|
||||
ctx := context.Background()
|
||||
|
|
Loading…
Add table
Reference in a new issue