Skip to content

Commit 8577e73

Browse files
release-25.4: oidcauth: increase HTTP client timeout and set test size to medium (#170563)
release-25.4: oidcauth: increase HTTP client timeout and set test size to medium
2 parents 6c273d5 + 0899f29 commit 8577e73

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

pkg/ccl/oidcccl/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ go_library(
4141

4242
go_test(
4343
name = "oidcccl_test",
44-
size = "small",
44+
size = "medium",
4545
srcs = [
4646
"authentication_oidc_test.go",
4747
"authorization_oidc_test.go",

pkg/ccl/oidcccl/authorization_oidc_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,9 @@ func TestOIDCAuthorization_TokenPaths(t *testing.T) {
299299
rpcCtx := app.NewClientRPCContext(ctx, username.TestUserName())
300300
client, err := rpcCtx.GetHTTPClient()
301301
require.NoError(t, err)
302+
// The default 10s timeout is too short under race detection where OIDC
303+
// callback processing can take 20s+.
304+
client.Timeout = 45 * time.Second
302305
// Prevent automatic redirects so we can capture cookies and headers.
303306
client.CheckRedirect = func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse }
304307

@@ -376,6 +379,9 @@ func TestOIDCAuthorization_UserinfoPaths(t *testing.T) {
376379
rpc := app.NewClientRPCContext(ctx, username.TestUserName())
377380
cl, err := rpc.GetHTTPClient()
378381
require.NoError(t, err)
382+
// The default 10s timeout is too short under race detection where OIDC
383+
// callback processing can take 20s+.
384+
cl.Timeout = 45 * time.Second
379385
cl.CheckRedirect = func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse }
380386

381387
// Create an RSA key pair for signing and verifying tokens.
@@ -729,6 +735,9 @@ func TestOIDCAuthorization_RoleGrantAndRevoke(t *testing.T) {
729735
rpcCtx := app.NewClientRPCContext(ctx, username.TestUserName())
730736
client, err := rpcCtx.GetHTTPClient()
731737
require.NoError(t, err)
738+
// The default 10s timeout is too short under race detection where OIDC
739+
// callback processing can take 20s+.
740+
client.Timeout = 45 * time.Second
732741
// Prevent automatic redirects so we can capture cookies and headers.
733742
client.CheckRedirect = func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse }
734743

0 commit comments

Comments
 (0)