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


The following commit(s) were added to refs/heads/master by this push:
     new 9951dc166 IMPALA-11794: Fix flakiness of 
TestLoadDataExternal.test_load by using dedicated table name
9951dc166 is described below

commit 9951dc166aadc77a96cc8c1fda140dad5e452234
Author: stiga-huang <[email protected]>
AuthorDate: Tue Dec 13 16:11:15 2022 +0800

    IMPALA-11794: Fix flakiness of TestLoadDataExternal.test_load by using 
dedicated table name
    
    IMPALA-11736 adds TestLoadDataExternal that uses the same table name
    used by an existing test (TestLoadData). These two tests both will clean
    up the test tables at the beginning and at the end. If they run
    concurrently, one of them will fail. Note that e2e tests are ran in
    parallel by default.
    
    This patch fixes TestLoadDataExternal to use a dedicated table name.
    
    Tests:
     - Verified locally
    
    Change-Id: I2ee29c93fb1dcf14c6adb9f320fde70baa72cadd
    Reviewed-on: http://gerrit.cloudera.org:8080/19350
    Reviewed-by: Michael Smith <[email protected]>
    Tested-by: Impala Public Jenkins <[email protected]>
---
 tests/metadata/test_load.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tests/metadata/test_load.py b/tests/metadata/test_load.py
index 316d3b2d5..2bb13aa7e 100644
--- a/tests/metadata/test_load.py
+++ b/tests/metadata/test_load.py
@@ -32,6 +32,7 @@ from tests.util.filesystem_utils import get_fs_path, WAREHOUSE
 
 TEST_TBL_PART = "test_load"
 TEST_TBL_NOPART = "test_load_nopart"
+TEST_TBL_NOPART_EXT = "test_load_nopart_ext"
 STAGING_PATH = '%s/test_load_staging' % WAREHOUSE
 ALLTYPES_PATH = "%s/alltypes/year=2010/month=1/100101.txt" % WAREHOUSE
 MULTIAGG_PATH = '%s/alltypesaggmultifiles/year=2010/month=1/day=1' % WAREHOUSE
@@ -124,7 +125,7 @@ class TestLoadDataExternal(ImpalaTestSuite):
         create_uncompressed_text_dimension(cls.get_workload()))
 
   def _clean_test_tables(self):
-    self.client.execute("drop table if exists 
functional.{0}".format(TEST_TBL_NOPART))
+    self.client.execute("drop table if exists 
functional.{0}".format(TEST_TBL_NOPART_EXT))
     self.filesystem_client.delete_file_dir(TMP_STAGING_PATH, recursive=True)
 
   def teardown_method(self, method):
@@ -138,13 +139,13 @@ class TestLoadDataExternal(ImpalaTestSuite):
     self.filesystem_client.copy(ALLTYPES_PATH, 
"{0}/100101.txt".format(TMP_STAGING_PATH))
 
     self.client.execute("create table functional.{0} like 
functional.alltypesnopart"
-        " location '{1}/{0}'".format(TEST_TBL_NOPART, WAREHOUSE))
+        " location '{1}/{0}'".format(TEST_TBL_NOPART_EXT, WAREHOUSE))
 
   def test_load(self, vector):
     self.execute_query_expect_success(self.client, "load data inpath 
'{0}/100101.txt'"
-        " into table functional.{1}".format(TMP_STAGING_PATH, TEST_TBL_NOPART))
+        " into table functional.{1}".format(TMP_STAGING_PATH, 
TEST_TBL_NOPART_EXT))
     result = self.execute_scalar(
-        "select count(*) from functional.{0}".format(TEST_TBL_NOPART))
+        "select count(*) from functional.{0}".format(TEST_TBL_NOPART_EXT))
     assert(result == '310')
 
 

Reply via email to