test(core): ignore ribbon_groups microbenchmark by default

The once_lock_eliminates_allocation_after_first_call test from PR #257
is a timing microbenchmark that Box::leaks ~400k strings by design to
defeat allocator reuse. Mark it #[ignore] so it stays out of the default
suite; cache correctness is already covered by the pointer-identity test.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-07-03 07:48:31 +03:00
commit 35468004e6

View file

@ -145,7 +145,13 @@ pub trait CadModule: Send + Sync {
mod tests {
use super::*;
// Timing microbenchmark, not a correctness check: it intentionally
// `Box::leak`s ~400k strings to defeat the allocator's reuse, so keep it out
// of the default suite. Run manually with `cargo test -- --ignored`.
// Correctness of the cache is covered by
// `once_lock_produces_identical_pointer_on_subsequent_calls`.
#[test]
#[ignore = "microbenchmark: leaks strings by design; run with --ignored"]
fn once_lock_eliminates_allocation_after_first_call() {
// Helper to build a realistic module tree (2 groups, ~20 items)
// Benchmark builds this manually for a clean before/after comparison.