Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-18.0] Fix flakiness in TestListenerShutdown (#17024) #17186

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions go/mysql/server_flaky_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1429,7 +1429,13 @@ func TestListenerShutdown(t *testing.T) {

l.Shutdown()

<<<<<<< HEAD:go/mysql/server_flaky_test.go
waitForConnRefuse(t, 1)
=======
require.Eventually(t, func() bool {
return connRefuse.Get() == 1
}, 1*time.Minute, 100*time.Millisecond, "could not reach the desired connRefuse value")
>>>>>>> 2d1e96ac46 (Fix flakiness in `TestListenerShutdown` (#17024)):go/mysql/server_test.go

err = conn.Ping()
require.EqualError(t, err, "Server shutdown in progress (errno 1053) (sqlstate 08S01)")
Expand All @@ -1441,6 +1447,7 @@ func TestListenerShutdown(t *testing.T) {
require.Equal(t, "Server shutdown in progress", sqlErr.Message)
}

<<<<<<< HEAD:go/mysql/server_flaky_test.go
func waitForConnRefuse(t *testing.T, valWanted int64) {
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
Expand All @@ -1459,6 +1466,8 @@ func waitForConnRefuse(t *testing.T, valWanted int64) {
}
}

=======
>>>>>>> 2d1e96ac46 (Fix flakiness in `TestListenerShutdown` (#17024)):go/mysql/server_test.go
func TestParseConnAttrs(t *testing.T) {
expected := map[string]string{
"_client_version": "8.0.11",
Expand Down
Loading