1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

5 commits

Author SHA1 Message Date
Aaron Lehmann
2704fd9156 Fix race in RunCommandWithOutputForDuration
This function was starting a goroutine that modifies one of its return
values. The intent is for the goroutine to only influence the return
value when it's causing the function to return, but it's racy and can
also modify the return value when the function is returning due to the
timeout. Fix the goroutine to not modify return values directly.

Also, give the channel a buffer so that the goroutine doesn't block
forever after a timeout.

Fixes #18305

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-12-03 16:34:01 -08:00
Vincent Demeester
7eab3db324 Fix TestDockerCmd*Timeout racey tests
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-09-29 14:50:22 +02:00
John Howard
e65a7dabb9 Fixes 16556 CI failures
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-09-24 11:19:00 -07:00
John Howard
5d630abbab TestRandomUnixTmpDirPath platform agnostic
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-09-24 09:37:07 -07:00
Vincent Demeester
5109071706 Add unit tests for integration cli utils function
- utils_test.go and docker_utils_test.go
- Moved docker related function to docker_utils.go
- add a test for integration-cli/checker

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-09-09 15:36:44 +02:00