Skip to content

Commit bbd1176

Browse files
Mark several tests as flaky
Signed-off-by: David Christensen <david.christensen@snowflake.com>
1 parent 3df2693 commit bbd1176

6 files changed

Lines changed: 30 additions & 6 deletions

File tree

Pipfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ duckdb = "==1.4.3"
2424
[dev-packages]
2525
black = "==25.9.0"
2626
pytest = "~=8.4"
27+
pytest-rerunfailures = "~=15.0"
2728
pytest-split = "~=0.10"
2829
setuptools = "~=80.9"
2930
wheel = "~=0.45"

Pipfile.lock

Lines changed: 10 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pg_lake_table/tests/pytests/test_data_file_pruning.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,14 @@ def test_simple_data_pruning_for_data_types(
114114

115115
explain_prefix = "EXPLAIN (analyze, verbose, format json) "
116116

117+
# Drop schema if it exists from a previous failed run
118+
run_command("DROP SCHEMA IF EXISTS test_data_file_pruning CASCADE", pg_conn)
119+
pg_conn.commit()
120+
117121
# Create table and insert rows
118122
create_table_sql = f"""
119123
CREATE SCHEMA test_data_file_pruning;
120-
124+
121125
CREATE TABLE test_data_file_pruning.{table_name} (
122126
col1 {column_type},
123127
col2 {column_type}

pg_lake_table/tests/pytests/test_iceberg_xacts.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
from test_writable_iceberg_common import *
99

1010

11+
# This test performs intense modifications to iceberg tables and verifies the
12+
# results via multiple processes (DuckDB/pg_lake and Spark). Mock S3 (Moto)
13+
# occasionally fails to serve metadata that was just written, causing transient
14+
# 404s — a test-harness consistency issue, not a product bug.
15+
@pytest.mark.flaky(reruns=2)
1116
@pytest.mark.parametrize(
1217
"manifest_min_count_to_merge, target_manifest_size_kb, max_snapshot_age_params ",
1318
manifest_snapshot_settings,

pg_lake_table/tests/pytests/test_partition_pruning.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@
204204
]
205205

206206

207+
@pytest.mark.flaky(reruns=2)
207208
@pytest.mark.parametrize("partition_type, partition_by", partition_by)
208209
@pytest.mark.parametrize("needs_quote, column_type, table_name, rows", pruning_data)
209210
def test_simple_data_pruning_for_data_types(
@@ -271,6 +272,10 @@ def test_simple_data_pruning_for_data_types(
271272

272273
explain_prefix = "EXPLAIN (analyze, verbose, format json) "
273274

275+
# Drop schema if it exists from a previous failed run
276+
run_command("DROP SCHEMA IF EXISTS test_data_file_pruning CASCADE", pg_conn)
277+
pg_conn.commit()
278+
274279
# Create table and insert rows
275280
create_table_sql = f"""
276281
CREATE SCHEMA test_data_file_pruning;

test_common/helpers/iceberg.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -353,9 +353,9 @@ def wait_until_object_store_writable_table_pushed(
353353
while True:
354354
run_command("SELECT pg_sleep(0.1)", superuser_conn)
355355
cnt += 1
356-
# up to 4 seconds
356+
# up to 10 seconds
357357
# the default is 1 second
358-
if cnt == 40:
358+
if cnt == 100:
359359
break
360360

361361
res1 = run_query(cmd_1, superuser_conn)
@@ -392,9 +392,9 @@ def wait_until_object_store_writable_table_removed(
392392
while True:
393393
run_command("SELECT pg_sleep(0.1)", superuser_conn)
394394
cnt += 1
395-
# up to 4 seconds
395+
# up to 10 seconds
396396
# the default is 1 second
397-
if cnt == 40:
397+
if cnt == 100:
398398
break
399399

400400
res = run_query(cmd, superuser_conn)

0 commit comments

Comments
 (0)