Skip to content

Commit 35b2d15

Browse files
authored
Merge pull request #154572 from yuzefovich/blathers/backport-release-25.3-154492
release-25.3: stmtdiagnostics: fix bizarre flake in TestDiagnosticsRequest
2 parents 282e772 + 1dddc36 commit 35b2d15

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pkg/sql/stmtdiagnostics/statement_diagnostics_test.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,12 @@ func TestDiagnosticsRequest(t *testing.T) {
166166
require.True(t, strings.Contains(err.Error(), sqlerrors.QueryTimeoutError.Error()))
167167

168168
// Reset the stmt timeout so that it doesn't affect the query in
169-
// checkCompleted.
170-
runner.Exec(t, "RESET statement_timeout;")
169+
// checkCompleted. Wrap it in a SucceedsSoon in case RESET query itself
170+
// times out.
171+
testutils.SucceedsSoon(t, func() error {
172+
_, err = db.Exec("RESET statement_timeout;")
173+
return err
174+
})
171175
checkCompleted(reqID)
172176
})
173177

0 commit comments

Comments
 (0)