From ff6755a68f7de3ac175e97312460cef7fae921da Mon Sep 17 00:00:00 2001 From: Matheus Degiovani Date: Fri, 17 Apr 2020 12:19:34 -0300 Subject: [PATCH] itest: Fix flake in garbage collect link See issue https://github.com/decred/dcrlnd/issues/97 for details. --- lntest/itest/lnd_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lntest/itest/lnd_test.go b/lntest/itest/lnd_test.go index 2e54c8dc58..8e6b2086e6 100644 --- a/lntest/itest/lnd_test.go +++ b/lntest/itest/lnd_test.go @@ -7545,6 +7545,13 @@ func testGarbageCollectLinkNodes(net *lntest.NetworkHarness, t *harnessTest) { return false } + // Ensure there's enough time after opening the channel for all nodes + // to process it before shutting them down, otherwise we might deadlock + // waiting for the chain to shut down. + // + // See https://github.com/decred/dcrlnd/issues/97 + time.Sleep(time.Second) + // Restart both Bob and Carol to ensure Alice is able to reconnect to // them. if err := net.RestartNode(net.Bob, nil); err != nil {