From 10ca6540547ad694f7ed31d67ebce75ae51e6242 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Mon, 19 Jun 2017 16:39:07 +0200 Subject: [PATCH] test: in async bi-di payment test wait for both sides to see the channel --- lnd_test.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lnd_test.go b/lnd_test.go index c749ca14..aada3b6a 100644 --- a/lnd_test.go +++ b/lnd_test.go @@ -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 }