itest: use fresh alice and bob for fwd interceptor tests
This commit is contained in:
parent
92b820a6d1
commit
374725842e
@ -227,11 +227,15 @@ func newInterceptorTestContext(t *harnessTest,
|
|||||||
ctxb := context.Background()
|
ctxb := context.Background()
|
||||||
|
|
||||||
// Create a three-node context consisting of Alice, Bob and Carol
|
// Create a three-node context consisting of Alice, Bob and Carol
|
||||||
|
alice, err := net.NewNode("alice", nil)
|
||||||
|
require.NoError(t.t, err, "unable to create alice")
|
||||||
|
bob, err := net.NewNode("bob", nil)
|
||||||
|
require.NoError(t.t, err, "unable to create bob")
|
||||||
carol, err := net.NewNode("carol", nil)
|
carol, err := net.NewNode("carol", nil)
|
||||||
require.NoError(t.t, err, "unable to create carol")
|
require.NoError(t.t, err, "unable to create carol")
|
||||||
|
|
||||||
// Connect nodes
|
// Connect nodes
|
||||||
nodes := []*lntest.HarnessNode{net.Alice, net.Bob, carol}
|
nodes := []*lntest.HarnessNode{alice, bob, carol}
|
||||||
for i := 0; i < len(nodes); i++ {
|
for i := 0; i < len(nodes); i++ {
|
||||||
for j := i + 1; j < len(nodes); j++ {
|
for j := i + 1; j < len(nodes); j++ {
|
||||||
ctxt, _ := context.WithTimeout(ctxb, defaultTimeout)
|
ctxt, _ := context.WithTimeout(ctxb, defaultTimeout)
|
||||||
@ -243,8 +247,8 @@ func newInterceptorTestContext(t *harnessTest,
|
|||||||
ctx := interceptorTestContext{
|
ctx := interceptorTestContext{
|
||||||
t: t,
|
t: t,
|
||||||
net: net,
|
net: net,
|
||||||
alice: net.Alice,
|
alice: alice,
|
||||||
bob: net.Bob,
|
bob: bob,
|
||||||
carol: carol,
|
carol: carol,
|
||||||
nodes: nodes,
|
nodes: nodes,
|
||||||
}
|
}
|
||||||
@ -328,6 +332,8 @@ func (c *interceptorTestContext) closeChannels() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *interceptorTestContext) shutdownNodes() {
|
func (c *interceptorTestContext) shutdownNodes() {
|
||||||
|
shutdownAndAssert(c.net, c.t, c.alice)
|
||||||
|
shutdownAndAssert(c.net, c.t, c.bob)
|
||||||
shutdownAndAssert(c.net, c.t, c.carol)
|
shutdownAndAssert(c.net, c.t, c.carol)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user