test: in testSingleHopInvoice also wait for bob to advertise the channel

This commit is contained in:
Olaoluwa Osuntokun 2017-08-22 00:50:30 -07:00
parent 321cc28cd8
commit ed3268b988
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2
1 changed files with 7 additions and 2 deletions

View File

@ -607,7 +607,7 @@ peersPoll:
}
// Both nodes should still show a single channel as pending.
time.Sleep(time.Millisecond * 300)
time.Sleep(time.Second * 1)
ctxt, _ = context.WithTimeout(ctxb, timeout)
assertNumOpenChannelsPending(ctxt, t, net.Alice, carol, 1)
@ -618,7 +618,7 @@ peersPoll:
// At this point, the channel should be fully opened and there should
// be no pending channels remaining for either node.
time.Sleep(time.Millisecond * 300)
time.Sleep(time.Second * 1)
ctxt, _ = context.WithTimeout(ctxb, timeout)
assertNumOpenChannelsPending(ctxt, t, net.Alice, carol, 0)
@ -1013,6 +1013,11 @@ func testSingleHopInvoice(net *networkHarness, t *harnessTest) {
t.Fatalf("alice didn't advertise channel before "+
"timeout: %v", err)
}
err = net.Bob.WaitForNetworkChannelOpen(ctxt, chanPoint)
if err != nil {
t.Fatalf("bob didn't advertise channel before "+
"timeout: %v", err)
}
// With the invoice for Bob added, send a payment towards Alice paying
// to the above generated invoice.