From 8b77e0183eaa7b3a87921f9655e2799d300bf775 Mon Sep 17 00:00:00 2001 From: Erik Hollensbe Date: Tue, 27 May 2014 12:04:20 -0700 Subject: [PATCH] Fix race condition in CLI tests: diff was not acquiring a container lock Docker-DCO-1.1-Signed-off-by: Erik Hollensbe (github: erikh) --- daemon/container.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/daemon/container.go b/daemon/container.go index 2ae263289d..a4bc835390 100644 --- a/daemon/container.go +++ b/daemon/container.go @@ -672,6 +672,8 @@ func (container *Container) Mount() error { } func (container *Container) Changes() ([]archive.Change, error) { + container.Lock() + defer container.Unlock() return container.daemon.Changes(container) }