Skip to content

Commit b3d4aa9

Browse files
authored
Merge pull request #154584 from yuzefovich/blathers/backport-release-25.4-154492
release-25.4: stmtdiagnostics: fix bizarre flake in TestDiagnosticsRequest
2 parents bba2441 + 4ba3d42 commit b3d4aa9

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
@@ -173,8 +173,12 @@ func TestDiagnosticsRequest(t *testing.T) {
173173
require.True(t, strings.Contains(err.Error(), sqlerrors.QueryTimeoutError.Error()))
174174

175175
// Reset the stmt timeout so that it doesn't affect the query in
176-
// checkCompleted.
177-
runner.Exec(t, "RESET statement_timeout;")
176+
// checkCompleted. Wrap it in a SucceedsSoon in case RESET query itself
177+
// times out.
178+
testutils.SucceedsSoon(t, func() error {
179+
_, err = db.Exec("RESET statement_timeout;")
180+
return err
181+
})
178182
checkCompleted(reqID)
179183
})
180184

0 commit comments

Comments
 (0)