autopilot: fix bug in skip nodes test, use new instance for each run

This commit is contained in:
Olaoluwa Osuntokun 2017-08-21 22:21:35 -07:00
parent 804edb8f02
commit a8576eaa69
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2

@ -557,9 +557,10 @@ func TestConstrainedPrefAttachmentSelectSkipNodes(t *testing.T) {
threshold = 0.5
)
skipNodes := make(map[NodeID]struct{})
for _, graph := range chanGraphs {
success := t.Run(graph.name, func(t1 *testing.T) {
skipNodes := make(map[NodeID]struct{})
graph, cleanup, err := graph.genFunc()
if err != nil {
t1.Fatalf("unable to create graph: %v", err)