lntest/node: make sure finalizing file is over before stop

This commit is contained in:
Johan T. Halseth 2018-07-17 09:13:05 +02:00
parent bca926d6af
commit ea2b706174
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26

@ -335,9 +335,11 @@ func (hn *HarnessNode) start(lndError chan<- error) error {
// Launch a new goroutine which that bubbles up any potential fatal
// process errors to the goroutine running the tests.
hn.processExit = make(chan struct{})
hn.wg.Add(1)
go func() {
err := hn.cmd.Wait()
defer hn.wg.Done()
err := hn.cmd.Wait()
if err != nil {
lndError <- errors.Errorf("%v\n%v\n", err, errb.String())
}