Repository navigation
test(engine): the GeoTIFF tile-layer test no longer deletes an open archive (fixes main CI on Windows) #1618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -33388,10 +33388,14 @@ 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 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()); | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit (test assertion, low impact): this checks
Suggested change
Confidence: medium. Only test-assertion precision; the rest of the change looks correct. The |
||||||
| 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) | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.