Browse code

Avoid defunct registry/notary processes during tests

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>

Tonis Tiigi authored on 2017/01/14 10:45:14
Showing 2 changed files
... ...
@@ -138,6 +138,7 @@ func (r *V2) Ping() error {
138 138
 // Close kills the registry server
139 139
 func (r *V2) Close() {
140 140
 	r.cmd.Process.Kill()
141
+	r.cmd.Process.Wait()
141 142
 	os.RemoveAll(r.dir)
142 143
 }
143 144
 
... ...
@@ -186,6 +186,7 @@ func (t *testNotary) Ping() error {
186 186
 
187 187
 func (t *testNotary) Close() {
188 188
 	t.cmd.Process.Kill()
189
+	t.cmd.Process.Wait()
189 190
 	os.RemoveAll(t.dir)
190 191
 }
191 192