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:
@ -83,20 +83,20 @@ func TestNatto(t *testing.T) {
|
||||
|
||||
err := jsre.Exec("test.js")
|
||||
if err != nil {
|
||||
t.Errorf("expected no error, got %v", err)
|
||||
t.Fatalf("expected no error, got %v", err)
|
||||
}
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
val, err := jsre.Run("msg")
|
||||
if err != nil {
|
||||
t.Errorf("expected no error, got %v", err)
|
||||
t.Fatalf("expected no error, got %v", err)
|
||||
}
|
||||
if val.ExportType().Kind() != reflect.String {
|
||||
t.Errorf("expected string value, got %v", val)
|
||||
t.Fatalf("expected string value, got %v", val)
|
||||
}
|
||||
exp := "testMsg"
|
||||
got := val.ToString().String()
|
||||
if exp != got {
|
||||
t.Errorf("expected '%v', got '%v'", exp, got)
|
||||
t.Fatalf("expected '%v', got '%v'", exp, got)
|
||||
}
|
||||
jsre.Stop(false)
|
||||
}
|
||||
|
Reference in New Issue
Block a user