From fe38ab72ce356abfa4a5a14844a427e68b2ee871 Mon Sep 17 00:00:00 2001 From: mavrick Date: Tue, 1 Dec 2026 17:17:07 -0600 Subject: [PATCH] test(engine): sweep a PDF's cancellation checks on a small page --- crates/engine/src/tests/cancellation.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/engine/src/tests/cancellation.rs b/crates/engine/src/tests/cancellation.rs index 29cc78c232..8042cf0956 100644 --- a/crates/engine/src/tests/cancellation.rs +++ b/crates/engine/src/tests/cancellation.rs @@ -236,7 +236,9 @@ pub(super) fn long_commands(boundaries: bool) { read(&s, "raster.imageGrid", &json!({"layer": dem})); // A PDF's page is read on the same queue: the file, then its drawing, Cancel looked at between // (#2336). - s.run("layout.new", &json!({"page": "a4", "template": "map"})).unwrap(); + // A small page: the sweep draws, measures and compares all its pixels at each check. At 50 mm it + // looks at Cancel as often as an A4 page does (32 times); at 25 mm, only 18. + s.run("layout.new", &json!({"width": 50, "height": 50, "template": "map"})).unwrap(); s.run("layout.export", &json!({"path": out("page.pdf"), "dpi": 36, "allPages": false})).unwrap(); read(&s, "layer.addData", &json!({"path": out("page.pdf")})); read(&s, "table.statistics", &json!({"layer": "Cities", "field": "pop_max"}));