You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by bo...@apache.org on 2023/08/03 12:57:59 UTC
[impala] branch master updated: IMPALA-12049: Deflake test_drop_corrupt_table
This is an automated email from the ASF dual-hosted git repository.
boroknagyz 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 7a02b3b27 IMPALA-12049: Deflake test_drop_corrupt_table
7a02b3b27 is described below
commit 7a02b3b276a803cededd726abcc0aa0fd114e198
Author: Andrew Sherman <as...@cloudera.com>
AuthorDate: Fri Jul 28 15:19:05 2023 -0700
IMPALA-12049: Deflake test_drop_corrupt_table
Originally there were two flavors of the test_drop_corrupt_table test.
One version (test_drop_corrupt_table_with_invalidate) did
an 'invalidate metadata' as part of the test after deleting metadata
files, and the other version did not. The version without invalidation
was depending on the catalog update resulting from adding the iceberg
table arriving at the coordinator before the deletion. This happens a
lot of the time but it can't be guaranteed. Fix the test by removing
test_drop_corrupt_table. Simplify the code a little by inlining a
method, and rename the remaining test to be test_drop_corrupt_table.
Change-Id: I4cbdf5646ed20bb8333e5557ed43226de993b7dd
Reviewed-on: http://gerrit.cloudera.org:8080/20289
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
tests/query_test/test_iceberg.py | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/tests/query_test/test_iceberg.py b/tests/query_test/test_iceberg.py
index 08f9cff34..45ae3bdb1 100644
--- a/tests/query_test/test_iceberg.py
+++ b/tests/query_test/test_iceberg.py
@@ -146,13 +146,6 @@ class TestIcebergTable(IcebergTestSuite):
@SkipIf.not_dfs(reason="Dfs required as test to directly delete files.")
def test_drop_corrupt_table(self, unique_database):
- self._do_test_drop_corrupt_table(unique_database, do_invalidate=False)
-
- @SkipIf.not_dfs(reason="Dfs required as test to directly delete files.")
- def test_drop_corrupt_table_with_invalidate(self, unique_database):
- self._do_test_drop_corrupt_table(unique_database, do_invalidate=True)
-
- def _do_test_drop_corrupt_table(self, unique_database, do_invalidate):
"""Test that if the underlying iceberg metadata directory is deleted, then a query
fails with a reasonable error message, and the table can be dropped successfully."""
table = "corrupt_iceberg_tbl"
@@ -166,9 +159,8 @@ class TestIcebergTable(IcebergTestSuite):
assert status, "Delete failed with {0}".format(status)
assert not self.filesystem_client.exists(metadata_location)
- if do_invalidate:
- # Invalidate so that table loading problems will happen in the catalog.
- self.client.execute("invalidate metadata {0}".format(full_table_name))
+ # Invalidate so that table loading problems will happen in the catalog.
+ self.client.execute("invalidate metadata {0}".format(full_table_name))
# Query should now fail.
err = self.execute_query_expect_failure(self.client, """select * from {0}""".