Tracking issue for #9759
Related #9784
Currently there are quite a few tests that have a code along the lines of:
for _, test := range testcases {
client := NewClient(...)
defer client.Close()
This closing will happen at the end of the function, not at the end of the for loop.