diff --git a/tools/run_tests/xds_k8s_test_driver/framework/test_app/runners/k8s/gamma_server_runner.py b/tools/run_tests/xds_k8s_test_driver/framework/test_app/runners/k8s/gamma_server_runner.py index 46dc7e2a264..b50c6aa487b 100644 --- a/tools/run_tests/xds_k8s_test_driver/framework/test_app/runners/k8s/gamma_server_runner.py +++ b/tools/run_tests/xds_k8s_test_driver/framework/test_app/runners/k8s/gamma_server_runner.py @@ -70,7 +70,7 @@ class GammaServerRunner(KubernetesServerRunner): safilter_name: str = "ssa-filter", sapolicy_name: str = "ssa-policy", bepolicy_name: str = "backend-policy", - termination_grace_period_seconds: Optional[int] = None, + termination_grace_period_seconds: int = 0, pre_stop_hook: bool = False, ): # pylint: disable=too-many-locals diff --git a/tools/run_tests/xds_k8s_test_driver/framework/xds_gamma_testcase.py b/tools/run_tests/xds_k8s_test_driver/framework/xds_gamma_testcase.py index 8734a41be3b..ab8d6529494 100644 --- a/tools/run_tests/xds_k8s_test_driver/framework/xds_gamma_testcase.py +++ b/tools/run_tests/xds_k8s_test_driver/framework/xds_gamma_testcase.py @@ -30,16 +30,13 @@ XdsTestServer = server_app.XdsTestServer logger = logging.getLogger(__name__) -# We never actually hit this timeout under normal circumstances, so this large -# value is acceptable. -_TERMINATION_GRACE_PERIOD_SECONDS = 600 - # TODO(sergiitk): [GAMMA] Move into framework/test_cases class GammaXdsKubernetesTestCase(xds_k8s_testcase.RegularXdsKubernetesTestCase): server_runner: GammaServerRunner frontend_service_name: str pre_stop_hook: Optional[bool] = None + termination_grace_period_seconds: int = 0 def setUp(self): """Hook method for setting up the test fixture before exercising it.""" @@ -113,7 +110,7 @@ class GammaXdsKubernetesTestCase(xds_k8s_testcase.RegularXdsKubernetesTestCase): network=self.network, debug_use_port_forwarding=self.debug_use_port_forwarding, enable_workload_identity=self.enable_workload_identity, - termination_grace_period_seconds=_TERMINATION_GRACE_PERIOD_SECONDS, + termination_grace_period_seconds=self.termination_grace_period_seconds, pre_stop_hook=self.pre_stop_hook, ) diff --git a/tools/run_tests/xds_k8s_test_driver/tests/gamma/affinity_test.py b/tools/run_tests/xds_k8s_test_driver/tests/gamma/affinity_test.py index e671ebcdec8..156b9b123d1 100644 --- a/tools/run_tests/xds_k8s_test_driver/tests/gamma/affinity_test.py +++ b/tools/run_tests/xds_k8s_test_driver/tests/gamma/affinity_test.py @@ -34,6 +34,11 @@ RpcTypeUnaryCall = xds_url_map_testcase.RpcTypeUnaryCall _REPLICA_COUNT = 3 +# TODO(rbellevi): set this property on the prestop hook test class +# We never actually hit this timeout under normal circumstances, so this large +# value is acceptable. +# termination_grace_period_seconds: int = 600 + class AffinityTest(xds_gamma_testcase.GammaXdsKubernetesTestCase): def getClientRpcStats(