tests: add timeout in 'revoked uncooperative close retribution' test

This commit is contained in:
Andrey Samokhvalov 2017-03-16 13:46:58 +03:00 committed by Olaoluwa Osuntokun
parent aa0fbcaefd
commit a423dc3e6c
1 changed files with 8 additions and 0 deletions

View File

@ -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.