From b70319e0d622d482df1268e5e7318d6084c5ba4b Mon Sep 17 00:00:00 2001 From: Wilmer Paulino Date: Fri, 15 Jun 2018 12:35:12 -0700 Subject: [PATCH] test: ensure harness nodes are connected before running each test Due to some of the previous commits, we no longer have persistent connections to peers whom we have no open channels with. It might be the case that this is triggered throughout any of the tests, so we'll ensure that the Alice and Bob harnesses are connected before running each test. --- lnd_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lnd_test.go b/lnd_test.go index b05b9a871..f3a34503c 100644 --- a/lnd_test.go +++ b/lnd_test.go @@ -10611,6 +10611,14 @@ func TestLightningNetworkDaemon(t *testing.T) { for _, testCase := range testsCases { logLine := fmt.Sprintf("STARTING ============ %v ============\n", testCase.name) + + err := lndHarness.EnsureConnected( + context.Background(), lndHarness.Alice, lndHarness.Bob, + ) + if err != nil { + t.Fatalf("unable to connect alice to bob: %v", err) + } + if err := lndHarness.Alice.AddToLog(logLine); err != nil { t.Fatalf("unable to add to log: %v", err) }