Modified connection helper to work correctly when many tests are being run