e2e: close process if spawnWithExpects fails

Was causing a process leak in TestCtlV3Alarm
This commit is contained in:
Anthony Romano 2016-10-10 15:52:37 -07:00
parent d7f69d0f92
commit 2448f6a003

View File

@ -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)