test: in async bi-di payment test wait for both sides to see the channel

This commit is contained in:
Olaoluwa Osuntokun 2017-06-19 16:39:07 +02:00
parent e324fe5818
commit 10ca654054
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2
1 changed files with 7 additions and 2 deletions

View File

@ -2748,11 +2748,14 @@ func testBidirectionalAsyncPayments(net *networkHarness, t *harnessTest) {
// Wait for Alice to receive the channel edge from the funding manager.
ctxt, _ = context.WithTimeout(ctxb, timeout)
err = net.Alice.WaitForNetworkChannelOpen(ctxt, chanPoint)
if err != nil {
if err = net.Alice.WaitForNetworkChannelOpen(ctxt, chanPoint); err != nil {
t.Fatalf("alice didn't see the alice->bob channel before "+
"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
// send payment between nodes.
@ -3043,7 +3046,9 @@ func TestLightningNetworkDaemon(t *testing.T) {
ht := newHarnessTest(t1)
ht.RunTestCase(testCase, lndHarness)
})
// Stop at the first failure. Mimic behavior of original test
// framework.
if !success {
break
}