itest: initialize context inside ConnectNodes
This commit is contained in:
17 files changed
+94
-155
No files matched your search
+5
-3
@@ -178,7 +178,7 @@ func (n *NetworkHarness) SetUp(t *testing.T,
|
||||
// both nodes are fully started since the Connect RPC is guarded behind
|
||||
// the server.Started() flag that waits for all subsystems to be ready.
|
||||
ctxb := context.Background()
|
||||
n.ConnectNodes(ctxb, t, n.Alice, n.Bob)
|
||||
n.ConnectNodes(t, n.Alice, n.Bob)
|
||||
|
||||
// Load up the wallets of the seeder nodes with 10 outputs of 1 BTC
|
||||
// each.
|
||||
@@ -670,8 +670,10 @@ func (n *NetworkHarness) EnsureConnected(ctx context.Context,
|
||||
//
|
||||
// NOTE: This function may block for up to 15-seconds as it will not return
|
||||
// until the new connection is detected as being known to both nodes.
|
||||
func (n *NetworkHarness) ConnectNodes(ctx context.Context, t *testing.T,
|
||||
a, b *HarnessNode) {
|
||||
func (n *NetworkHarness) ConnectNodes(t *testing.T, a, b *HarnessNode) {
|
||||
ctxb := context.Background()
|
||||
ctx, cancel := context.WithTimeout(ctxb, DefaultTimeout)
|
||||
defer cancel()
|
||||
|
||||
bobInfo, err := b.GetInfo(ctx, &lnrpc.GetInfoRequest{})
|
||||
require.NoErrorf(
|
||||
|
||||
Reference in new issue
Block a user