class_docstr: Test setting keep_alive_timeout_s in config and env.
class_docstr_tok: ["Test","setting","keep_alive_timeout_s","in","config","and","env","."]
docstr: Test when keep_alive_timeout_s is in both http configs and env.
  
  When the keep_alive_timeout_s is set in env, the uvicorn keep alive
  is set to the one in env.
docstr_tok: ["Test","when","keep_alive_timeout_s","is","in","both","http","configs","and","env",".","When","the","keep_alive_timeout_s","is","set","in","env",",","the","uvicorn","keep","alive","is","set","to","the","one","in","env","."]
code: def test_set_timeout_keep_alive_in_both_config_and_env(
      self, ray_instance, ray_shutdown
  ):
      """Test when keep_alive_timeout_s is in both http configs and env.
  
      When the keep_alive_timeout_s is set in env, the uvicorn keep alive
      is set to the one in env.
      """
      keep_alive_timeout_s = 222
      serve.start(
          http_options={"keep_alive_timeout_s": keep_alive_timeout_s}
      )
      proxy_actor = self.get_proxy_actor()
      assert ray.get(proxy_actor._uvicorn_keep_alive.remote()) == 333
  
imports: import asyncio
  import pickle
  import sys
  from typing import Dict
  from unittest.mock import AsyncMock
  import grpc
  import pytest
  import ray
  from ray import serve
  from ray.actor import ActorHandle
  from ray.serve._private.common import DeploymentID, EndpointInfo, EndpointTag
  from ray.serve._private.constants import DEFAULT_UVICORN_KEEP_ALIVE_TIMEOUT_S, SERVE_NAMESPACE
  from ray.serve._private.proxy import DRAINED_MESSAGE, HEALTH_CHECK_SUCCESS_MESSAGE, HTTPProxy, ResponseStatus, gRPCProxy
  from ray.serve._private.proxy_request_response import ProxyRequest
  from ray.serve._private.proxy_router import ProxyRouter
  from ray.serve._private.test_utils import FakeGrpcContext
  from ray.serve.generated import serve_pb2
  from ray.serve.grpc_util import RayServegRPCContext
label_desc: Use image node_id 5 for calling the TestTimeoutKeepAliveConfig obj's underlying member method code with example usage: obj.test_set_timeout_keep_alive_in_both_config_and_env(ray_instance, ray_shutdown) without return types