Skip to content

Commit

Permalink
Merge pull request #9951 from rouault/fix_test_wms_15_flake
Browse files Browse the repository at this point in the history
autotest: test_wms_15: make it robust to flaky server
  • Loading branch information
rouault committed May 16, 2024
2 parents 26f5bc3 + 373b227 commit d7678bb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions autotest/gdrivers/wms.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,11 +643,13 @@ def test_wms_14():
def test_wms_15():

srv = "http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer?f=json&pretty=true"
src_ds = gdal.Open(srv)
if src_ds is None:
try:
src_ds = gdal.Open(srv)
except Exception:
if gdaltest.gdalurlopen(srv) is None:
pytest.skip()
pytest.skip(f"{srv} not available")
pytest.fail()

ds = gdal.GetDriverByName("WMS").CreateCopy("/vsimem/wms.xml", src_ds)
src_ds = None
assert ds, "failed to copy"
Expand Down

0 comments on commit d7678bb

Please sign in to comment.