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()`
This commit is contained in:
Ting Yuan
2021-12-27 20:36:26 +08:00
committed by GitHub
parent 69279532f4
commit e6f28dbeb2

View File

@@ -860,6 +860,7 @@ func TestNodeProposeAddLearnerNode(t *testing.T) {
<-applyConfChan
close(stop)
<-done
n.Stop()
}
func TestAppendPagination(t *testing.T) {