Repository: impala Updated Branches: refs/heads/master 02ee2d1c5 -> 2e9f5c90e
IMPALA-7023: Wait for fragments to finish for test_insert.py The arrangement of tests in test_insert.py changed with IMPALA-7010, splitting out the memory limit tests into test_insert_mem_limit(). On exhaustive, the combination of test dimensions means test_insert_mem_limit() executes 11 different combinations. Each of these statements can use a large amount of memory and this is not cleaned up immediately. This has been causing test_insert_overwrite(), which immediately follows test_insert_mem_limit(), to hit the process memory limit. This changes test_insert_mem_limit() to make it wait for its fragments to finish. Change-Id: I5642e9cb32dd02afd74dde7e0d3b31bddbee3ccd Reviewed-on: http://gerrit.cloudera.org:8080/10426 Reviewed-by: Philip Zeyliger <phi...@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Project: http://git-wip-us.apache.org/repos/asf/impala/repo Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/1e6544f7 Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/1e6544f7 Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/1e6544f7 Branch: refs/heads/master Commit: 1e6544f7da1d756b437d8b0f12a6446f10f1f836 Parents: 02ee2d1 Author: Joe McDonnell <joemcdonn...@cloudera.com> Authored: Mon May 14 22:31:21 2018 -0700 Committer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Committed: Wed May 16 23:33:57 2018 +0000 ---------------------------------------------------------------------- tests/query_test/test_insert.py | 8 ++++++++ 1 file changed, 8 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/impala/blob/1e6544f7/tests/query_test/test_insert.py ---------------------------------------------------------------------- diff --git a/tests/query_test/test_insert.py b/tests/query_test/test_insert.py index 2307b76..88aafb2 100644 --- a/tests/query_test/test_insert.py +++ b/tests/query_test/test_insert.py @@ -20,6 +20,7 @@ import pytest from testdata.common import widetable +from tests.common.impala_cluster import ImpalaCluster from tests.common.impala_test_suite import ImpalaTestSuite from tests.common.skip import SkipIfLocal, SkipIfNotHdfsMinicluster from tests.common.test_dimensions import ( @@ -31,6 +32,7 @@ from tests.common.test_result_verifier import ( QueryTestResult, parse_result_rows) from tests.common.test_vector import ImpalaTestDimension +from tests.verifiers.metric_verifier import MetricVerifier PARQUET_CODECS = ['none', 'snappy', 'gzip'] @@ -125,6 +127,12 @@ class TestInsertQueries(ImpalaTestSuite): vector.get_value('compression_codec') self.run_test_case('QueryTest/insert-mem-limit', vector, multiple_impalad=vector.get_value('exec_option')['sync_ddl'] == 1) + # IMPALA-7023: These queries can linger and use up memory, causing subsequent + # tests to hit memory limits. Wait for some time to allow the query to + # be reclaimed. + verifiers = [ MetricVerifier(i.service) for i in ImpalaCluster().impalads ] + for v in verifiers: + v.wait_for_metric("impala-server.num-fragments-in-flight", 0, timeout=60) @pytest.mark.execute_serially def test_insert_overwrite(self, vector):