Skip to content

Commit efb536d

Browse files
committed
drop_table in clean_up instead of purge
1 parent c90f484 commit efb536d

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

tests/conftest.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2318,19 +2318,13 @@ def fixture_s3_client() -> boto3.client:
23182318
yield boto3.client("s3")
23192319

23202320

2321-
def clean_up(test_catalog: Catalog, drop_if_cannot_purge: bool = False) -> None:
2321+
def clean_up(test_catalog: Catalog) -> None:
23222322
"""Clean all databases and tables created during the integration test."""
23232323
for database_tuple in test_catalog.list_namespaces():
23242324
database_name = database_tuple[0]
23252325
if "my_iceberg_database-" in database_name:
23262326
for identifier in test_catalog.list_tables(database_name):
2327-
try:
2328-
test_catalog.purge_table(identifier)
2329-
except Exception as e:
2330-
if drop_if_cannot_purge:
2331-
test_catalog.drop_table(identifier)
2332-
else:
2333-
raise e
2327+
test_catalog.drop_table(identifier)
23342328
test_catalog.drop_namespace(database_name)
23352329

23362330

tests/integration/test_catalog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def hive_catalog() -> Generator[Catalog, None, None]:
8686
},
8787
)
8888
yield test_catalog
89-
clean_up(test_catalog, drop_if_cannot_purge=True)
89+
clean_up(test_catalog)
9090

9191

9292
@pytest.mark.integration

0 commit comments

Comments
 (0)