core, miner, rpc, eth: fix goroutine leaks in tests (#24211)

* fix blocking and non-blocking issues

* core: revert change in blockchain.go

Co-authored-by: Martin Holst Swende <martin@swende.se>
This commit is contained in:
Shihao Xia
2022-01-21 12:22:44 +01:00
committed by GitHub
co-authored by Martin Holst Swende
parent ae45c97d3d
commit eef7a33135
9 changed files with 50 additions and 26 deletions
+1 -1
View File
@@ -393,7 +393,7 @@ func TestLifecycleTerminationGuarantee(t *testing.T) {
// on the given prefix
func TestRegisterHandler_Successful(t *testing.T) {
node := createNode(t, 7878, 7979)
defer node.Close()
// create and mount handler
handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("success"))