//! Common test utilities and helpers for Foxhunt testing suites //! //! This crate provides shared utilities, fixtures, and helper functions //! used across all test suites in the Foxhunt system. // Allow dead code for test infrastructure that may not be fully used yet #![allow(dead_code)] use std::sync::Once; use tracing_subscriber; static INIT: Once = Once::new(); /// Initialize logging for tests - safe to call multiple times pub fn init_test_logging() { INIT.call_once(|| { tracing_subscriber::fmt() .with_env_filter("debug") .with_test_writer() .try_init() .ok(); // Ignore errors if already initialized }); } /// Test configuration constants pub mod constants { use rust_decimal::Decimal; use std::time::Duration; pub const DEFAULT_TIMEOUT: Duration = Duration::from_secs(30); pub const FAST_TIMEOUT: Duration = Duration::from_secs(5); pub const SLOW_TIMEOUT: Duration = Duration::from_secs(120); pub const MIN_PRICE: Decimal = Decimal::from_parts(1, 0, 0, false, 8); // 0.00000001 pub const MAX_PRICE: Decimal = Decimal::from_parts(1000000, 0, 0, false, 0); // 1,000,000 pub const MIN_QUANTITY: Decimal = Decimal::from_parts(1, 0, 0, false, 8); pub const MAX_QUANTITY: Decimal = Decimal::from_parts(1000000, 0, 0, false, 0); }