mirror of
https://github.com/aljazceru/breez-lnd.git
synced 2026-02-22 15:04:19 +01:00
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:
@@ -547,6 +547,10 @@ func testUpdateChannelPolicy(net *lntest.NetworkHarness, t *harnessTest) {
|
||||
chanAmt, pushAmt)
|
||||
|
||||
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)
|
||||
if err != nil {
|
||||
t.Fatalf("bob didn't report channel: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user