diff options
author | Wolfy-J <[email protected]> | 2018-06-11 15:01:04 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-06-11 15:01:04 +0300 |
commit | 699d34beb94492d57a8da15cfbaebe11245ecac9 (patch) | |
tree | 6d41c01e09216fa82a9008f06cc3d79140ea8052 /service/container_test.go | |
parent | 846cec64f177a9cfef016a8225c4fae0faa29a0c (diff) |
improved tests
Diffstat (limited to 'service/container_test.go')
-rw-r--r-- | service/container_test.go | 9 |
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{} { |