소스 검색

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)