test: in testUpdateChannelPolicy wait for Alice to learn of all channels
In this commit, we fix an existing flake in the integration tests. If it was the case that Alice didn't yet know of all the channels, then the payment attempt below would fail at times, depending on other timing factors in the test. We fix this flake by waiting for Alice to learn of all channels before we proceed to the actual testing logic.
This commit is contained in:
parent
5f0d07e485
commit
4bf86aab27
@ -547,6 +547,10 @@ func testUpdateChannelPolicy(net *lntest.NetworkHarness, t *harnessTest) {
|
|||||||
chanAmt, pushAmt)
|
chanAmt, pushAmt)
|
||||||
|
|
||||||
ctxt, _ = context.WithTimeout(ctxb, time.Second*15)
|
ctxt, _ = context.WithTimeout(ctxb, time.Second*15)
|
||||||
|
err = net.Alice.WaitForNetworkChannelOpen(ctxt, chanPoint2)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("alice didn't report channel: %v", err)
|
||||||
|
}
|
||||||
err = net.Bob.WaitForNetworkChannelOpen(ctxt, chanPoint2)
|
err = net.Bob.WaitForNetworkChannelOpen(ctxt, chanPoint2)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("bob didn't report channel: %v", err)
|
t.Fatalf("bob didn't report channel: %v", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user