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

stigahuang pushed a commit to branch branch-4.4.1
in repository https://gitbox.apache.org/repos/asf/impala.git

commit 0c2af2de55a38b2f93d22ac49f6e202c6bcea685
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  | 4 ++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/tests/custom_cluster/test_query_live.py 
b/tests/custom_cluster/test_query_live.py
index bb6746614..7e8a35009 100644
--- a/tests/custom_cluster/test_query_live.py
+++ b/tests/custom_cluster/test_query_live.py
@@ -34,9 +34,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 a81f92ca5..91996f387 100644
--- a/tests/custom_cluster/test_query_log.py
+++ b/tests/custom_cluster/test_query_log.py
@@ -66,11 +66,11 @@ class TestQueryLogTableBase(CustomClusterTestSuite):
     # code checks to make sure the table create has finished before returning.
     create_re = r'\]\s+(\w+:\w+)\]\s+Analyzing query: CREATE TABLE IF NOT 
EXISTS {}' \
         .format(query_table_name)
-    create_match = self.assert_impalad_log_contains("INFO", create_re)
+    create_match = self.assert_impalad_log_contains("INFO", create_re, 
timeout_s=60)
 
     finish_re = r'Query successfully unregistered: query_id={}' \
         .format(create_match.group(1))
-    self.assert_impalad_log_contains("INFO", finish_re)
+    self.assert_impalad_log_contains("INFO", finish_re, timeout_s=60)
 
     if protocol == self.PROTOCOL_BEESWAX:
       return self.client

Reply via email to