mirror of
https://github.com/apache/impala.git
synced 2025-12-23 21:08:39 -05:00
IMPALA-8553,IMPALA-8552: fix checks for remote cluster
Apparently IMPALA_REMOTE_URL is not generally used for remote cluster tests: only --testing_remote_cluster is reliably set. Fix the is_remote_cluster() implementation to take into account REMOTE_DATA_LOAD and --testing_remote_cluster in addition to IMPALA_REMOTE_URL. Consistently use is_remote_cluster() in other tests instead of checking the pytest flag directly. There were a few lifecycle headaches with how ImpalaTestClusterProperties is used: * common.environ is imported from conftest, which means that the top-level code in the file runs *before* pytest command-line arguments have been registered and parsed. * ImpalaTestClusterProperties is used by various code, like build_flavor_timeout(), which runs before pytest command-line arguments have been parsed. * ImpalaTestClusterProperties is called from non-pytest scripts like start-impala-cluster.py, so the command-line arguments are not available. I dealt with the above challenges by making a few changes to do the detection later: * Lazily initializing a singleton ImpalaTestClusterProperties. This was not strictly necessary but makes the whole problem less sensitive to import order and module dependencies. * Adding cluster_properties fixture to make ImpalaTestClusterProperties available in tests without additional boilerplate. * Removing the caching of the local/remote build calculation. ImpalaTestClusterProperties is instantiated outside of python tests, but is_remote_cluster() is only called from python tests, so if we check flags in is_remote_cluster() we'll get the right results reliably. As a workaround to unblock remote tests, also assume catalog_v1 if accessing the web UI fails. Testing: Ran core tests against a regular minicluster. Ran tests against a remote cluster Change-Id: Ifa6b2a1391f53121d3d7c00c5cf0a57590899ce4 Reviewed-on: http://gerrit.cloudera.org:8080/13386 Reviewed-by: Tim Armstrong <tarmstrong@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
This commit is contained in:
committed by
Impala Public Jenkins
parent
f1f3ae9ec2
commit
9ecbe7d3dc
@@ -33,7 +33,7 @@ from beeswaxd.BeeswaxService import QueryState
|
||||
|
||||
from tests.beeswax.impala_beeswax import ImpalaBeeswaxException
|
||||
from tests.common.custom_cluster_test_suite import CustomClusterTestSuite
|
||||
from tests.common.environ import build_flavor_timeout, IMPALA_TEST_CLUSTER_PROPERTIES
|
||||
from tests.common.environ import build_flavor_timeout, ImpalaTestClusterProperties
|
||||
from tests.common.impala_test_suite import ImpalaTestSuite
|
||||
from tests.common.resource_pool_config import ResourcePoolConfig
|
||||
from tests.common.skip import (
|
||||
@@ -1172,7 +1172,7 @@ class TestAdmissionControllerStress(TestAdmissionControllerBase):
|
||||
|
||||
# Additional constraints for code coverage jobs and core.
|
||||
num_queries = None
|
||||
if IMPALA_TEST_CLUSTER_PROPERTIES.has_code_coverage():
|
||||
if ImpalaTestClusterProperties.get_instance().has_code_coverage():
|
||||
# Code coverage builds can't handle the increased concurrency.
|
||||
num_queries = 15
|
||||
elif cls.exploration_strategy() == 'core':
|
||||
|
||||
Reference in New Issue
Block a user