You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by mi...@apache.org on 2018/09/21 16:03:11 UTC
[3/7] impala git commit: IMPALA-7594: Fix the waiting time in
test_automatic_invalidation
IMPALA-7594: Fix the waiting time in test_automatic_invalidation
IMPALA-7593 increased the table invalidation timeout but the time to
wait for the effect should also be increased.
Change-Id: Ibb41e615e42712f9f75a4180f55270f8d4159668
Reviewed-on: http://gerrit.cloudera.org:8080/11471
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
Project: http://git-wip-us.apache.org/repos/asf/impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/e563a8dd
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/e563a8dd
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/e563a8dd
Branch: refs/heads/master
Commit: e563a8dd39f66c45faf917f890c20897fee50ebd
Parents: 23f5338
Author: Tianyi Wang <ti...@apache.org>
Authored: Wed Sep 19 11:57:08 2018 -0700
Committer: Impala Public Jenkins <im...@cloudera.com>
Committed: Thu Sep 20 02:12:21 2018 +0000
----------------------------------------------------------------------
tests/custom_cluster/test_automatic_invalidation.py | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/impala/blob/e563a8dd/tests/custom_cluster/test_automatic_invalidation.py
----------------------------------------------------------------------
diff --git a/tests/custom_cluster/test_automatic_invalidation.py b/tests/custom_cluster/test_automatic_invalidation.py
index 3e40036..2d03d09 100644
--- a/tests/custom_cluster/test_automatic_invalidation.py
+++ b/tests/custom_cluster/test_automatic_invalidation.py
@@ -32,8 +32,10 @@ class TestAutomaticCatalogInvalidation(CustomClusterTestSuite):
url = "http://localhost:25020/catalog_object?object_type=TABLE&" \
"object_name=functional.alltypes"
- timeout_flag = "--invalidate_tables_timeout_s=" + \
- ("20" if IMPALAD_BUILD.runs_slowly() or (not IS_HDFS and not IS_LOCAL) else "10")
+ # The test will run a query and assumes the table is loaded when the query finishes.
+ # The timeout should be larger than the time of the query.
+ timeout = 20 if IMPALAD_BUILD.runs_slowly() or (not IS_HDFS and not IS_LOCAL) else 10
+ timeout_flag = "--invalidate_tables_timeout_s=" + str(timeout)
@classmethod
def get_workload(cls):
@@ -49,13 +51,14 @@ class TestAutomaticCatalogInvalidation(CustomClusterTestSuite):
cursor.fetchall()
# The table is cached after usage.
assert self.metadata_cache_string in self._get_catalog_object()
- timeout = time.time() + 20
+ # Wait 2 * table TTL for the invalidation to take effect.
+ max_wait_time = time.time() + self.timeout * 2
while True:
time.sleep(1)
# The table is eventually evicted.
if self.metadata_cache_string not in self._get_catalog_object():
return
- assert time.time() < timeout
+ assert time.time() < max_wait_time
@pytest.mark.execute_serially
@CustomClusterTestSuite.with_args(catalogd_args=timeout_flag, impalad_args=timeout_flag)