From 89368456d86e2329c46594490c58cfc51c9c7c92 Mon Sep 17 00:00:00 2001 From: Andrei Vagin Date: Tue, 16 Jul 2019 15:05:12 -0700 Subject: test/integration: wait a background process Otherwise this process can be killed before it prints the test message. PiperOrigin-RevId: 258448204 --- runsc/test/integration/regression_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runsc/test/integration/regression_test.go b/runsc/test/integration/regression_test.go index 39b30e757..fb68dda99 100644 --- a/runsc/test/integration/regression_test.go +++ b/runsc/test/integration/regression_test.go @@ -32,7 +32,7 @@ func TestBindOverlay(t *testing.T) { } d := testutil.MakeDocker("bind-overlay-test") - cmd := "nc -l -U /var/run/sock& sleep 1 && echo foobar-asdf | nc -U /var/run/sock" + cmd := "nc -l -U /var/run/sock & p=$! && sleep 1 && echo foobar-asdf | nc -U /var/run/sock && wait $p" got, err := d.RunFg("ubuntu:trusty", "bash", "-c", cmd) if err != nil { t.Fatal("docker run failed:", err) -- cgit v1.2.3