From 56f07a55989d69c2c4f764100548d69589c53b6e Mon Sep 17 00:00:00 2001 From: bherbruck Date: Fri, 30 Oct 2026 19:41:24 +0000 Subject: [PATCH] Hover test: allow the first hover half of the index time, not a third (#9638) On a loaded runner the hover alone has taken 70 ms against a 190 ms index, which failed unrelated pull requests. Waiting for the index would still cost all of it. Co-authored-by: Claude Opus 5.5 --- crates/ui-egui/src/preselect_tests.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/preselect_tests.rs b/crates/ui-egui/src/preselect_tests.rs index 88a510baa..77b4bfb06 100644 --- a/crates/ui-egui/src/preselect_tests.rs +++ b/crates/ui-egui/src/preselect_tests.rs @@ -2773,7 +2773,9 @@ fn hovering_a_large_body_does_not_wait_for_its_pick_index() { h.step(&json!({"move": at})).unwrap(); let hover_ms = t.elapsed().as_secs_f64() * 1000.0; assert!(matches!(h.app.viewport.hover, Some(crate::viewport::Hit::Face { .. })), "{:?}", h.app.viewport.hover); - assert!(hover_ms < index_ms / 3.0, "the first hover took {hover_ms:.1} ms; making the index takes {index_ms:.1} ms"); + // Half, not a third: on a loaded runner the hover alone has taken 70 ms against a 190 ms index. + // Waiting for the index would cost the whole of it, so half still tells the two apart. + assert!(hover_ms < index_ms / 2.0, "the first hover took {hover_ms:.1} ms; making the index takes {index_ms:.1} ms"); } /// #4452: with Combine open, bodies clicked in the Browser fill its inputs, as clicks on them