Attempt to fix the flaky TestDeleteUser/TestUpdateUser mssql tests (#13071)

- Add a 'Connect Timeout' query parameter to the test helper to set
   a timeout value of 30 seconds in an attempt to address the following
   failure we see at times in TestDeleteUser and TestUpdateUser

   mssql_test.go:253: Failed to initialize: error verifying connection: TLS Handshake failed: cannot read handshake packet: EOF
This commit is contained in:
Steven Clark 2021-11-05 14:53:37 -04:00 committed by GitHub
parent 3a882fad3a
commit 687701d9a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,6 +53,8 @@ func connectMSSQL(ctx context.Context, host string, port int) (docker.ServiceCon
User: url.UserPassword("sa", mssqlPassword),
Host: fmt.Sprintf("%s:%d", host, port),
}
// Attempt to address connection flakiness within tests such as "Failed to initialize: error verifying connection ..."
u.Query().Add("Connection Timeout", "30")
db, err := sql.Open("mssql", u.String())
if err != nil {