This is an automated email from the ASF dual-hosted git repository.

michaelsmith pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git

commit d5b4fdcb016d098ea8c473d97fd1dc514ec214a1
Author: jasonmfehr <[email protected]>
AuthorDate: Mon Jun 24 12:40:43 2024 -0700

    IMPALA-13167: Fix Workload Management Tests Timing out
    
    The workload management tests in test_query_log.py have been timing out
    when they wait for workload management to fully initialize the
    sys.impala_query_log and sys.impala_query_live tables. These tests do
    not find the log message stating that the sys.impala_query_log table
    has been created. These tests use the assert_impalad_log_contains
    function from impala_test_suite.py to search for the relevant log
    message. By default, this function only allows 6 seconds for this
    message to appear. In bigger clusters that have larger amounts of data
    to sync from the statestore and catalog, this time is not long enough.
    
    This patch modifies the timeout from 6 seconds to 1 minute that the
    tests will wait before they time out. The longer timeout will give more
    time for the cluster to completed start and workload management to
    initialize before it fails the test.
    
    Change-Id: I7ca8c7543360b5cb183cfb0b0b515d38c17e0974
    Reviewed-on: http://gerrit.cloudera.org:8080/21549
    Reviewed-by: Impala Public Jenkins <[email protected]>
    Reviewed-by: Andrew Sherman <[email protected]>
    Tested-by: Impala Public Jenkins <[email protected]>
---
 tests/custom_cluster/test_query_live.py | 6 ++++--
 tests/custom_cluster/test_query_log.py  | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/tests/custom_cluster/test_query_live.py 
b/tests/custom_cluster/test_query_live.py
index a93aca3ae..69f0f514f 100644
--- a/tests/custom_cluster/test_query_live.py
+++ b/tests/custom_cluster/test_query_live.py
@@ -38,9 +38,11 @@ class TestQueryLive(CustomClusterTestSuite):
   def setup_method(self, method):
     super(TestQueryLive, self).setup_method(method)
     create_match = self.assert_impalad_log_contains("INFO", 
r'\]\s+(\w+:\w+)\]\s+'
-        r'Analyzing query: CREATE EXTERNAL TABLE IF NOT EXISTS 
sys.impala_query_live')
+        r'Analyzing query: CREATE EXTERNAL TABLE IF NOT EXISTS 
sys.impala_query_live',
+        timeout_s=60)
     self.assert_impalad_log_contains("INFO", r'Query successfully 
unregistered: '
-        r'query_id={}'.format(create_match.group(1)))
+        r'query_id={}'.format(create_match.group(1)),
+        timeout_s=60)
 
   def assert_describe_extended(self):
     describe_ext_result = self.execute_query('describe extended 
sys.impala_query_live')
diff --git a/tests/custom_cluster/test_query_log.py 
b/tests/custom_cluster/test_query_log.py
index 4a8852509..037104ca3 100644
--- a/tests/custom_cluster/test_query_log.py
+++ b/tests/custom_cluster/test_query_log.py
@@ -60,9 +60,11 @@ class TestQueryLogTableBase(CustomClusterTestSuite):
     # creating the completed queries table. Thus, to make these tests more 
robust, this
     # code checks to make sure the table create has finished before returning.
     create_match = self.assert_impalad_log_contains("INFO", 
r'\]\s+(\w+:\w+)\]\s+'
-        r'Analyzing query: CREATE TABLE IF NOT EXISTS 
{}'.format(self.QUERY_TBL))
+        r'Analyzing query: CREATE TABLE IF NOT EXISTS 
{}'.format(self.QUERY_TBL),
+        timeout_s=60)
     self.assert_impalad_log_contains("INFO", r'Query successfully 
unregistered: '
-        r'query_id={}'.format(create_match.group(1)))
+        r'query_id={}'.format(create_match.group(1)),
+        timeout_s=60)
 
   def get_client(self, protocol):
     """Retrieves the default Impala client for the specified protocol. This 
client is

Reply via email to