summaryrefslogtreecommitdiff
path: root/service/container_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'service/container_test.go')
-rw-r--r--service/container_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/service/container_test.go b/service/container_test.go
index 1fcff8db..8eaf13d4 100644
--- a/service/container_test.go
+++ b/service/container_test.go
@@ -46,6 +46,10 @@ func (t *testService) Serve() error {
<-t.serving
+ t.mu.Lock()
+ t.serving = nil
+ t.mu.Unlock()
+
return nil
}
@@ -53,7 +57,12 @@ func (t *testService) Stop() {
t.mu.Lock()
defer t.mu.Unlock()
+ if t.serving == nil {
+ return
+ }
+
close(t.serving)
+ t.serving = nil
}
func (t *testService) waitChan() chan interface{} {