From ed3268b988c97f87897cd61000af59f8511dc0f6 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Tue, 22 Aug 2017 00:50:30 -0700 Subject: [PATCH] test: in testSingleHopInvoice also wait for bob to advertise the channel --- lnd_test.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lnd_test.go b/lnd_test.go index 52eb322c..5d7a8100 100644 --- a/lnd_test.go +++ b/lnd_test.go @@ -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.