From 311f0e42410878d28a83cdec70a22ee122546dcf Mon Sep 17 00:00:00 2001 From: giswqs Date: Sun, 8 Nov 2026 06:03:03 -0500 Subject: [PATCH 1/2] test(engine): the GeoTIFF tile-layer test no longer deletes an archive the session holds open (fixes main CI on Windows) --- crates/engine/src/tests.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/crates/engine/src/tests.rs b/crates/engine/src/tests.rs index cd31710330..67277f2f73 100644 --- a/crates/engine/src/tests.rs +++ b/crates/engine/src/tests.rs @@ -33388,10 +33388,12 @@ fn export_map_to_geotiff_draws_tile_layers_and_keeps_their_credits() { drop(c); s.map_mut().tiles.clear(); s.run("layer.addData", &json!({"path": broken.display().to_string()})).unwrap(); - // Its file gone before the map is drawn. - let gone = s.map().tiles[0].url.clone(); - std::fs::remove_file(&broken).unwrap(); - s.map_mut().tiles[0].url = gone.replace("broken", "gone"); + // Its file gone before the map is drawn: the layer points at an archive that isn't there. + // (Not by deleting `broken.mbtiles`: the session holds it open, and Windows refuses to + // delete an open file.) + let gone = s.map().tiles[0].url.replace("broken", "gone"); + assert!(!dir.join("gone.mbtiles").exists()); + s.map_mut().tiles[0].url = gone; let n = s.notices.len(); s.run("share.exportMap", &json!({"path": path.display().to_string()})).unwrap(); // Said as a tile layer that couldn't be drawn, or (where the reader is slower to give up) From 19b5529eed2de6f61666fbb1147723545bd0614f Mon Sep 17 00:00:00 2001 From: giswqs Date: Sun, 8 Nov 2026 06:39:57 -0500 Subject: [PATCH 2/2] test(engine): rename only the archive's file name when pointing the layer at a missing one --- crates/engine/src/tests.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/engine/src/tests.rs b/crates/engine/src/tests.rs index 67277f2f73..804304c095 100644 --- a/crates/engine/src/tests.rs +++ b/crates/engine/src/tests.rs @@ -33391,9 +33391,11 @@ fn export_map_to_geotiff_draws_tile_layers_and_keeps_their_credits() { // Its file gone before the map is drawn: the layer points at an archive that isn't there. // (Not by deleting `broken.mbtiles`: the session holds it open, and Windows refuses to // delete an open file.) - let gone = s.map().tiles[0].url.replace("broken", "gone"); + let url = s.map().tiles[0].url.clone(); + let gone = url.strip_suffix("broken.mbtiles").map(|head| format!("{head}gone.mbtiles")); + assert!(gone.is_some(), "{url}"); assert!(!dir.join("gone.mbtiles").exists()); - s.map_mut().tiles[0].url = gone; + s.map_mut().tiles[0].url = gone.unwrap_or_default(); let n = s.notices.len(); s.run("share.exportMap", &json!({"path": path.display().to_string()})).unwrap(); // Said as a tile layer that couldn't be drawn, or (where the reader is slower to give up)