From 4db5b86d9bfb904385dff7dc992f6a2ded7a9e6d Mon Sep 17 00:00:00 2001 From: jgrusewski Date: Mon, 23 Feb 2026 01:14:24 +0100 Subject: [PATCH] chore(tests): clean stale FIXME in test_runner, document lock contention tracking Co-Authored-By: Claude Opus 4.6 --- services/trading_service/tests/performance_benchmarks.rs | 5 ++++- tests/test_runner.rs | 9 ++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/services/trading_service/tests/performance_benchmarks.rs b/services/trading_service/tests/performance_benchmarks.rs index 7f4aea8b0..86a75ed7e 100644 --- a/services/trading_service/tests/performance_benchmarks.rs +++ b/services/trading_service/tests/performance_benchmarks.rs @@ -261,7 +261,10 @@ impl PerformanceBenchmark { peak_memory_mb: Self::get_peak_memory_mb(), avg_cpu_percent: Self::get_avg_cpu_percent(), - lock_contention_count: 0, // TODO: Add lock contention tracking + // Contention tracking deferred -- requires instrumenting all RwLock/Mutex + // acquisitions with try_lock() fallback counting. For production, use + // tokio-metrics or prometheus histograms. + lock_contention_count: 0, }; Ok(results) diff --git a/tests/test_runner.rs b/tests/test_runner.rs index 074a89498..4a1a5fe83 100644 --- a/tests/test_runner.rs +++ b/tests/test_runner.rs @@ -12,13 +12,8 @@ use std::collections::HashMap; use std::sync::atomic::{AtomicU64, Ordering}; use std::time::{Duration, Instant}; -// Import from the tests library crate (lib.rs) -// Note: test_runner is a binary, so it imports from the tests library -// FIXME: critical_tests crate doesn't exist - these modules are not available -// use critical_tests::safety::{SafeTestError, SafeTestResult}; -// use critical_tests::helpers::mock_implementations::{MockPerformanceMonitor, PerformanceStats}; - -// Define types locally since critical_tests doesn't exist +// SafeTestError, SafeTestResult, PerformanceStats, and MockPerformanceMonitor are +// defined locally below rather than imported from an external crate. /// Result type for safe test execution with custom error handling pub type SafeTestResult = Result;