@@ -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