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 493d563590595433e19ef5d5c2f457d43f3637f8 Author: Yida Wu <[email protected]> AuthorDate: Fri Nov 1 10:22:51 2024 -0700 IMPALA-13510: Unset the environment variable for tuple cache tests The test_cache_disabled test case would fail in the tuple cache build because the build enables the tuple cache using the environment variables, while the test case requires the tuple cache to remain disabled. This patch unset the related environment variable TUPLE_CACHE_DIR before running the tuple cache related tests to ensure the tests are using its own starting flags. Tests: Passed the test_tuple_cache.py under the tuple cache build. Change-Id: I2b551e533c7c69d5b29ed6ad6af90be57f53c937 Reviewed-on: http://gerrit.cloudera.org:8080/22018 Reviewed-by: Impala Public Jenkins <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- tests/custom_cluster/test_tuple_cache.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/custom_cluster/test_tuple_cache.py b/tests/custom_cluster/test_tuple_cache.py index 6ccac038a..eccbe5d1a 100644 --- a/tests/custom_cluster/test_tuple_cache.py +++ b/tests/custom_cluster/test_tuple_cache.py @@ -17,6 +17,7 @@ from __future__ import absolute_import, division, print_function +import os import pytest import random import re @@ -99,6 +100,21 @@ def assert_deterministic_scan(vector, profile): class TestTupleCacheBase(CustomClusterTestSuite): + @classmethod + def setup_class(cls): + super(TestTupleCacheBase, cls).setup_class() + # Unset this environment variable to ensure it doesn't affect + # the test like test_cache_disabled. + cls.org_tuple_cache_dir = os.getenv("TUPLE_CACHE_DIR") + if cls.org_tuple_cache_dir is not None: + os.unsetenv("TUPLE_CACHE_DIR") + + @classmethod + def teardown_class(cls): + if cls.org_tuple_cache_dir is not None: + os.environ["TUPLE_CACHE_DIR"] = cls.org_tuple_cache_dir + super(TestTupleCacheBase, cls).teardown_class() + @classmethod def get_workload(cls): return 'functional-query'
