From 86328ec843b6eca261f2a951a856697932e2da7f Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Sat, 10 Oct 2026 12:18:59 -0400 Subject: [PATCH] Review fix-up: ignore the wall-clock scaling test by default; check its values every run recalc_with_range_formulas_scales_linearly is flaky under load, so it is #[ignore]d (run with --ignored in release). A small range_formulas_recalc_and_bulk_edit_correctly test keeps the helper's value check in every run. The helper reads Instant::now, so it allows clippy::disallowed_methods (required once #125's clippy.toml lands). Co-Authored-By: Claude Opus 5.5 --- crates/calc/src/recalc.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crates/calc/src/recalc.rs b/crates/calc/src/recalc.rs index 35c77d2eb..dbf532c8c 100644 --- a/crates/calc/src/recalc.rs +++ b/crates/calc/src/recalc.rs @@ -953,6 +953,7 @@ mod tests { } /// Opening (full recalc), changing every value of a column, and re-entering every formula. + #[allow(clippy::disallowed_methods)] // a native-only timing test: the clock is read off wasm fn open_and_bulk_edit(rows: u32) -> Duration { let mut wb = sum_rows(rows); let mut calc = Calc::new(); @@ -975,6 +976,14 @@ mod tests { } #[test] + fn range_formulas_recalc_and_bulk_edit_correctly() { + // The values behind the timing test below, checked on every run. + open_and_bulk_edit(500); + } + + #[test] + #[ignore = "timing-sensitive; run with --ignored in release"] + #[allow(clippy::disallowed_methods)] fn recalc_with_range_formulas_scales_linearly() { // Each row's SUM reads a range in the same columns. Recalculating on open used to walk // every row per range read (the used range), and finding a cell's dependents scanned