From d7c8c8c57277f50437c0160679af14c256f55c06 Mon Sep 17 00:00:00 2001 From: Jeffrey Czyz Date: Mon, 4 Oct 2021 16:06:38 -0500 Subject: [PATCH] Speed up test_timer_tick_called --- lightning-background-processor/src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lightning-background-processor/src/lib.rs b/lightning-background-processor/src/lib.rs index c7d55ae61..fd1ad6fe2 100644 --- a/lightning-background-processor/src/lib.rs +++ b/lightning-background-processor/src/lib.rs @@ -60,13 +60,15 @@ const FRESHNESS_TIMER: u64 = 60; #[cfg(test)] const FRESHNESS_TIMER: u64 = 1; -#[cfg(not(debug_assertions))] +#[cfg(all(not(test), not(debug_assertions)))] const PING_TIMER: u64 = 5; /// Signature operations take a lot longer without compiler optimisations. /// Increasing the ping timer allows for this but slower devices will be disconnected if the /// timeout is reached. -#[cfg(debug_assertions)] +#[cfg(all(not(test), debug_assertions))] const PING_TIMER: u64 = 30; +#[cfg(test)] +const PING_TIMER: u64 = 1; /// Trait which handles persisting a [`ChannelManager`] to disk. /// -- 2.39.5