Skip to content

Commit 8d52533

Browse files
committed
first round - flaky fix 2
1 parent 0247d61 commit 8d52533

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

test/integ/test_put_get.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -813,16 +813,19 @@ def test_get_multiple_files_with_same_name(tmp_path, conn_cnx, caplog):
813813
cur.execute(
814814
f"PUT 'file://{filename_in_put}' @{stage_name}/data/2/",
815815
)
816-
816+
817817
# Verify files are uploaded before attempting GET
818818
import time
819+
819820
for _ in range(10): # Wait up to 10 seconds for files to be available
820821
file_list = cur.execute(f"LS @{stage_name}").fetchall()
821822
if len(file_list) >= 2: # Both files should be available
822823
break
823824
time.sleep(1)
824825
else:
825-
pytest.fail(f"Files not available in stage after 10 seconds: {file_list}")
826+
pytest.fail(
827+
f"Files not available in stage after 10 seconds: {file_list}"
828+
)
826829

827830
with caplog.at_level(logging.WARNING):
828831
try:
@@ -832,10 +835,11 @@ def test_get_multiple_files_with_same_name(tmp_path, conn_cnx, caplog):
832835
except OperationalError:
833836
# This can happen due to cloud storage timing issues
834837
pass
835-
838+
836839
# Check for the expected warning message
837-
assert "Downloading multiple files with the same name" in caplog.text, \
838-
f"Expected warning not found in logs: {caplog.text}"
840+
assert (
841+
"Downloading multiple files with the same name" in caplog.text
842+
), f"Expected warning not found in logs: {caplog.text}"
839843

840844

841845
@pytest.mark.skipolddriver

0 commit comments

Comments
 (0)