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 6811a008851ba4637f1caaf4e272036e5da0fbc6 Author: Riza Suminto <[email protected]> AuthorDate: Fri Oct 27 09:34:49 2023 -0700 IMPALA-12524: Deduplicate TestTextScanRangeLengths This patch deduplicates TestTextScanRangeLengths in test_scanners.py by renaming them to TestTextScanRangeLengths1 and TestTextScanRangeLengths2. This patch also renames two test classes in test_local_catalog.py: TestCompactCatalogUpdates that duplicates test_compact_catalog_updates.py::TestCompactCatalogUpdates and TestObservability that duplicates test_observability.py::TestObservability. Testing: - Ran test_scanners.py and confirm that both TestTextScanRangeLengths1 and TestTextScanRangeLengths2 are run. - Run and pass test_local_catalog.py. - Checked with git grep that all pytest class names are unique. git grep "^class Test" tests/ | cut -d":" -f2 | sort | uniq -c | sort Change-Id: I1c26d8b7d20960b54b4d2ded3bb3f32b34c3b544 Reviewed-on: http://gerrit.cloudera.org:8080/20630 Reviewed-by: Michael Smith <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- tests/custom_cluster/test_local_catalog.py | 5 +++-- tests/query_test/test_scanners.py | 9 +++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/custom_cluster/test_local_catalog.py b/tests/custom_cluster/test_local_catalog.py index 04fd2d33f..349958a9a 100644 --- a/tests/custom_cluster/test_local_catalog.py +++ b/tests/custom_cluster/test_local_catalog.py @@ -36,7 +36,7 @@ RETRY_PROFILE_MSG = 'Retried query planning due to inconsistent metadata' CATALOG_VERSION_LOWER_BOUND = 'catalog.catalog-object-version-lower-bound' -class TestCompactCatalogUpdates(CustomClusterTestSuite): +class TestLocalCatalogCompactUpdates(CustomClusterTestSuite): @pytest.mark.execute_serially @CustomClusterTestSuite.with_args( @@ -449,7 +449,8 @@ class TestLocalCatalogRetries(CustomClusterTestSuite): for i in t.imap_unordered(do_table, range(NUM_ITERS)): pass -class TestObservability(CustomClusterTestSuite): + +class TestLocalCatalogObservability(CustomClusterTestSuite): def get_catalog_cache_metrics(self, impalad): """ Returns catalog cache metrics as a dict by scraping the json metrics page on the given impalad""" diff --git a/tests/query_test/test_scanners.py b/tests/query_test/test_scanners.py index c5e2dbb9e..1cd0ea298 100644 --- a/tests/query_test/test_scanners.py +++ b/tests/query_test/test_scanners.py @@ -1374,7 +1374,7 @@ class TestParquetScanRangeAssigment(ImpalaTestSuite): # More tests for text scanner # 1. Test file that ends w/o tuple delimiter # 2. Test file with escape character -class TestTextScanRangeLengths(ImpalaTestSuite): +class TestTextScanRangeLengths1(ImpalaTestSuite): ESCAPE_TABLE_LIST = ["testescape_16_lf", "testescape_16_crlf", "testescape_17_lf", "testescape_17_crlf", "testescape_32_lf", "testescape_32_crlf"] @@ -1385,7 +1385,7 @@ class TestTextScanRangeLengths(ImpalaTestSuite): @classmethod def add_test_dimensions(cls): - super(TestTextScanRangeLengths, cls).add_test_dimensions() + super(TestTextScanRangeLengths1, cls).add_test_dimensions() cls.ImpalaTestMatrix.add_dimension( ImpalaTestDimension('max_scan_range_length', *MAX_SCAN_RANGE_LENGTHS)) cls.ImpalaTestMatrix.add_constraint(lambda v: @@ -1490,15 +1490,16 @@ class TestTextSplitDelimiters(ImpalaTestSuite): assert sorted(result.data) == sorted(expected_result) + # Test for IMPALA-1740: Support for skip.header.line.count -class TestTextScanRangeLengths(ImpalaTestSuite): +class TestTextScanRangeLengths2(ImpalaTestSuite): @classmethod def get_workload(cls): return 'functional-query' @classmethod def add_test_dimensions(cls): - super(TestTextScanRangeLengths, cls).add_test_dimensions() + super(TestTextScanRangeLengths2, cls).add_test_dimensions() cls.ImpalaTestMatrix.add_constraint(lambda v: v.get_value('table_format').file_format == 'text' and v.get_value('table_format').compression_codec in ['none', 'gzip'])
