X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/418c57bce3aac1a22548e53e1018a1547d9efee4..4aee7d57faff02fc6b7b6f750dc22a29e58bb963:/sdk/go/arvadostest/run_servers.go diff --git a/sdk/go/arvadostest/run_servers.go b/sdk/go/arvadostest/run_servers.go index dcc2fb084e..490a7f3e03 100644 --- a/sdk/go/arvadostest/run_servers.go +++ b/sdk/go/arvadostest/run_servers.go @@ -104,7 +104,10 @@ func StopAPI() { defer os.Chdir(cwd) chdirToPythonTests() - bgRun(exec.Command("python", "run_test_server.py", "stop")) + cmd := exec.Command("python", "run_test_server.py", "stop") + bgRun(cmd) + // Without Wait, "go test" in go1.10.1 tends to hang. https://github.com/golang/go/issues/24050 + cmd.Wait() } // StartKeep starts the given number of keep servers, @@ -132,12 +135,9 @@ func StopKeep(numKeepServers int) { chdirToPythonTests() cmd := exec.Command("python", "run_test_server.py", "stop_keep", "--num-keep-servers", strconv.Itoa(numKeepServers)) - cmd.Stdin = nil - cmd.Stderr = os.Stderr - cmd.Stdout = os.Stderr - if err := cmd.Run(); err != nil { - log.Fatalf("%+v: %s", cmd.Args, err) - } + bgRun(cmd) + // Without Wait, "go test" in go1.10.1 tends to hang. https://github.com/golang/go/issues/24050 + cmd.Wait() } // Start cmd, with stderr and stdout redirected to our own