test: in async bi-di payment test wait for both sides to see the channel
This commit is contained in:
parent
e324fe5818
commit
10ca654054
@ -2748,11 +2748,14 @@ func testBidirectionalAsyncPayments(net *networkHarness, t *harnessTest) {
|
|||||||
|
|
||||||
// Wait for Alice to receive the channel edge from the funding manager.
|
// Wait for Alice to receive the channel edge from the funding manager.
|
||||||
ctxt, _ = context.WithTimeout(ctxb, timeout)
|
ctxt, _ = context.WithTimeout(ctxb, timeout)
|
||||||
err = net.Alice.WaitForNetworkChannelOpen(ctxt, chanPoint)
|
if err = net.Alice.WaitForNetworkChannelOpen(ctxt, chanPoint); err != nil {
|
||||||
if err != nil {
|
|
||||||
t.Fatalf("alice didn't see the alice->bob channel before "+
|
t.Fatalf("alice didn't see the alice->bob channel before "+
|
||||||
"timeout: %v", err)
|
"timeout: %v", err)
|
||||||
}
|
}
|
||||||
|
if err = net.Bob.WaitForNetworkChannelOpen(ctxt, chanPoint); err != nil {
|
||||||
|
t.Fatalf("bob didn't see the bob->alice channel before "+
|
||||||
|
"timeout: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
// Open up a payment streams to Alice and to Bob, that we'll use to
|
// Open up a payment streams to Alice and to Bob, that we'll use to
|
||||||
// send payment between nodes.
|
// send payment between nodes.
|
||||||
@ -3043,7 +3046,9 @@ func TestLightningNetworkDaemon(t *testing.T) {
|
|||||||
ht := newHarnessTest(t1)
|
ht := newHarnessTest(t1)
|
||||||
ht.RunTestCase(testCase, lndHarness)
|
ht.RunTestCase(testCase, lndHarness)
|
||||||
})
|
})
|
||||||
|
|
||||||
// Stop at the first failure. Mimic behavior of original test
|
// Stop at the first failure. Mimic behavior of original test
|
||||||
|
// framework.
|
||||||
if !success {
|
if !success {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user