From 57cb40fcb78e99d07c00186ee052cb654ef1b965 Mon Sep 17 00:00:00 2001 From: Sergii Tkachenko Date: Thu, 25 Jan 2024 12:33:30 -0800 Subject: [PATCH] Gamma tests: redistribute startTestClient wait times (#25) When we added the active ADS check in front of the client-server connection check, but we didn't consider where GAMMA test client spends the majority of its time: `GammaXdsKubernetesTestCase.startTestClient` had `wait_for_server_channel_ready_timeout` set to 10 minutes before `wait_for_active_ads_timeout` check existed, but actual increased wait happens in `wait_for_active_ads_timeout`. This would cause some of the CSM failures being misclassified as b/296293582 Timeout establishing ADS stream due to IAM/Workload Identity propagation delay. --- framework/xds_gamma_testcase.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/framework/xds_gamma_testcase.py b/framework/xds_gamma_testcase.py index 0d86a15b..62fdb9e7 100644 --- a/framework/xds_gamma_testcase.py +++ b/framework/xds_gamma_testcase.py @@ -127,11 +127,15 @@ def startTestClient( # test suites because they only start waiting after already waited for # the TD backends to be created and report healthy. # In GAMMA, these resources are created asynchronously by Kubernetes. - # To compensate for this, we double the timeout for GAMMA tests. + # To compensate for this, we double the timeout for the active ADS + # stream detection in GAMMA tests. Until the mesh is created, + # ADS calls are rejected with "NOT_FOUND: Requested entity was + # not found." return self._start_test_client( server_target, - wait_for_server_channel_ready_timeout=datetime.timedelta( - minutes=10 - ), + wait_for_active_ads_timeout=datetime.timedelta(minutes=10), + # TODO(sergiitk): consider decreasing to 5 minutes, if the majority + # of the wait time spent on waiting ADS. + wait_for_server_channel_ready_timeout=datetime.timedelta(minutes=9), **kwargs, )