I am running some tests on my driver, When i run queryrow func for 10000 times it gives me error. How to solve it or how to change the test run time.
ERROR: *** Test killed: ran too long (10m0s)
CODE:
for i := 0; i < 10000; i++ {
err := t.QueryRow("select name from foo where id = ?;", 1).Scan(&name)
if err != nil || name != "bob" {
t.Fatalf("on query %d: err=%v, name=%q", i, err, name)
}
}
I simulated your example on a default mysql instance but i didn’t succeed to replicate your error. I suspect the problem comes from the driver who seems to be an early one Also i think about a misconfigured timeout somewhere.