From a8576eaa69a4b71b497294380a9387d5286820b7 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Mon, 21 Aug 2017 22:21:35 -0700 Subject: [PATCH] autopilot: fix bug in skip nodes test, use new instance for each run --- autopilot/prefattach_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autopilot/prefattach_test.go b/autopilot/prefattach_test.go index 611b3bc6..0d537ece 100644 --- a/autopilot/prefattach_test.go +++ b/autopilot/prefattach_test.go @@ -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)