Browse code

testutil/daemon: remove redundant d.cmd.Wait()

`daemon.StartWithLogFile()` already creates a goroutine that
calls `d.cmd.Waits()` and sends its return to the channel, `d.Wait`.

This code called `d.cmd.Wait()` one more time, and returns the
error, which may produce an error _because_ it's called a second
time, and potentially cause an incorrect test-result.

(thanks to Kir Kolyshkin for spotting this)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2019/10/10 05:20:08
Showing 1 changed files
... ...
@@ -524,7 +524,7 @@ out2:
524 524
 		return err
525 525
 	}
526 526
 
527
-	return d.cmd.Wait()
527
+	return nil
528 528
 }
529 529
 
530 530
 // Restart will restart the daemon by first stopping it and the starting it.