diff --git a/serial_test/Cargo.toml b/serial_test/Cargo.toml index 23bd311..a6488e5 100644 --- a/serial_test/Cargo.toml +++ b/serial_test/Cargo.toml @@ -26,7 +26,7 @@ itertools = "0.10" tokio = { version = "^1.17", features = ["macros", "rt"] } [features] -default = ["logging", "timeout"] +default = ["logging"] ## Switches on debug logging (and requires the `log` package) logging = ["log"] @@ -34,10 +34,6 @@ logging = ["log"] ## The file_locks feature unlocks the `file_serial`/`file_parallel` macros file_locks = ["fslock"] -## The `timeout` feature lets tests time out after a certain amount of time -## if not enabled tests will wait indefinitely to be started -timeout = [] - docsrs = ["document-features"] # docs.rs-specific configuration diff --git a/serial_test/src/code_lock.rs b/serial_test/src/code_lock.rs index cb9c5ae..fd50b75 100644 --- a/serial_test/src/code_lock.rs +++ b/serial_test/src/code_lock.rs @@ -3,7 +3,6 @@ use lazy_static::lazy_static; #[cfg(feature = "logging")] use log::debug; use parking_lot::RwLock; -#[cfg(feature = "timeout")] use std::time::Instant; use std::{ collections::HashMap, @@ -62,7 +61,7 @@ impl Default for UniqueReentrantMutex { pub(crate) fn check_new_key(name: &str, max_wait: Option) { let start = Instant::now(); loop { - #[cfg(all(feature = "logging", feature = "timeout"))] + #[cfg(all(feature = "logging"))] { let duration = start.elapsed(); debug!("Waiting for '{}' {:?}", name, duration); @@ -89,7 +88,6 @@ pub(crate) fn check_new_key(name: &str, max_wait: Option) { // If the try_lock fails, then go around the loop again // Odds are another test was also locking on the write and has now written the key - #[cfg(feature = "timeout")] if let Some(max_wait) = max_wait { let duration = start.elapsed(); if duration > max_wait {