From 493944351265210038e5b136e3de0247d9b9c426 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Mon, 17 Apr 2017 12:39:08 -0700 Subject: [PATCH] test: fix race condition in framework by waiting for goroutine exit --- networktest.go | 1 + 1 file changed, 1 insertion(+) diff --git a/networktest.go b/networktest.go index 9a7b151d..780d7d92 100644 --- a/networktest.go +++ b/networktest.go @@ -280,6 +280,7 @@ func (l *lightningNode) Stop() error { } close(l.quit) + l.wg.Wait() if runtime.GOOS == "windows" { return l.cmd.Process.Signal(os.Kill) }