From a423dc3e6c84bc7130a3ecf6621ee9c488f76c6f Mon Sep 17 00:00:00 2001 From: Andrey Samokhvalov Date: Thu, 16 Mar 2017 13:46:58 +0300 Subject: [PATCH] tests: add timeout in 'revoked uncooperative close retribution' test --- lnd_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lnd_test.go b/lnd_test.go index 5dc01798..86936318 100644 --- a/lnd_test.go +++ b/lnd_test.go @@ -1467,6 +1467,14 @@ func testRevokedCloseRetribution(net *networkHarness, t *harnessTest) { return bobChannelInfo.Channels[0], nil } + // Wait for Alice to receive the channel edge from the funding manager. + ctxt, _ = context.WithTimeout(ctxb, timeout) + err := net.Alice.WaitForNetworkChannelOpen(ctxt, chanPoint) + if err != nil { + t.Fatalf("alice didn't see the alice->bob channel before "+ + "timeout: %v", err) + } + // Open up a payment stream to Alice that we'll use to send payment to // Bob. We also create a small helper function to send payments to Bob, // consuming the payment hashes we generated above.