From cd3c2185061e1e1bcbe075835d44ba8ba15cf0a9 Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Wed, 17 Jan 2024 03:25:33 +0000 Subject: [PATCH] review fixes --- framework/test_app/runners/k8s/k8s_xds_client_runner.py | 6 ++++-- kubernetes-manifests/client.deployment.yaml | 4 ++++ tests/gamma/csm_observability_test.py | 4 +++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/framework/test_app/runners/k8s/k8s_xds_client_runner.py b/framework/test_app/runners/k8s/k8s_xds_client_runner.py index 50a29887..def640f1 100644 --- a/framework/test_app/runners/k8s/k8s_xds_client_runner.py +++ b/framework/test_app/runners/k8s/k8s_xds_client_runner.py @@ -107,6 +107,8 @@ def run( # pylint: disable=arguments-differ print_response=False, log_to_stdout: bool = False, enable_csm_observability: bool = False, + request_payload_size: int = 0, + response_payload_size: int = 0, ) -> XdsTestClient: logger.info( ( @@ -156,8 +158,8 @@ def run( # pylint: disable=arguments-differ server_target=server_target, rpc=rpc, qps=qps, - request_payload_size=271828, - response_payload_size=314159, + request_payload_size=request_payload_size, + response_payload_size=response_payload_size, metadata=metadata, secure_mode=secure_mode, config_mesh=config_mesh, diff --git a/kubernetes-manifests/client.deployment.yaml b/kubernetes-manifests/client.deployment.yaml index 3fc19265..1e7eeff7 100644 --- a/kubernetes-manifests/client.deployment.yaml +++ b/kubernetes-manifests/client.deployment.yaml @@ -41,8 +41,12 @@ spec: - "--qps=${qps}" - "--rpc=${rpc}" - "--metadata=${metadata}" + % if request_payload_size > 0: - "--request_payload_size=${request_payload_size}" + % endif + % if response_payload_size > 0: - "--response_payload_size=${response_payload_size}" + % endif - "--print_response=${print_response}" % if enable_csm_observability: - "--enable_csm_observability" diff --git a/tests/gamma/csm_observability_test.py b/tests/gamma/csm_observability_test.py index 08df75fe..d285f8ab 100644 --- a/tests/gamma/csm_observability_test.py +++ b/tests/gamma/csm_observability_test.py @@ -55,7 +55,9 @@ def test_csm_observability(self): with self.subTest("2_start_test_client"): test_client: _XdsTestClient = self.startTestClient( - test_server, enable_csm_observability=True + test_server, enable_csm_observability=True, + request_payload_size=271828, + response_payload_size=314159, ) with self.subTest("3_test_server_received_rpcs_from_test_client"):