From e6f28dbeb2a91a7278ccaadd3f7d6aaa07d25d56 Mon Sep 17 00:00:00 2001 From: Ting Yuan Date: Mon, 27 Dec 2021 20:36:26 +0800 Subject: [PATCH] Fix goroutine leaks in TestNodeProposeAddDuplicateNode raft: fix goroutine leaks in TestNodeProposeAddDuplicateNode The goroutine created with `n.run()` will leak if we forget to call `n.Stop()` --- raft/node_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/raft/node_test.go b/raft/node_test.go index e44d073e2..e56a1cabe 100644 --- a/raft/node_test.go +++ b/raft/node_test.go @@ -860,6 +860,7 @@ func TestNodeProposeAddLearnerNode(t *testing.T) { <-applyConfChan close(stop) <-done + n.Stop() } func TestAppendPagination(t *testing.T) {