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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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