From 2448f6a0039fc1e5e234b7989d6ca5c3560ace80 Mon Sep 17 00:00:00 2001 From: Anthony Romano Date: Mon, 10 Oct 2016 15:52:37 -0700 Subject: [PATCH] e2e: close process if spawnWithExpects fails Was causing a process leak in TestCtlV3Alarm --- e2e/etcd_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/e2e/etcd_test.go b/e2e/etcd_test.go index b7abe6918..c7065d382 100644 --- a/e2e/etcd_test.go +++ b/e2e/etcd_test.go @@ -510,6 +510,7 @@ func spawnWithExpects(args []string, xs ...string) error { for { l, err := proc.ExpectFunc(lineFunc) if err != nil { + proc.Close() return fmt.Errorf("%v (expected %q, got %q)", err, txt, lines) } lines = append(lines, l)