浏览代码

e2e: close process if spawnWithExpects fails

Was causing a process leak in TestCtlV3Alarm
Anthony Romano 9 年之前
父节点
当前提交
2448f6a003
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      e2e/etcd_test.go

+ 1 - 0
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)