Skip to content

Commit 1e522d0

Browse files
committed
Shorten node ann. broadcast timer in tests
1 parent 962476a commit 1e522d0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,10 @@ impl Node {
541541
let mut stop_bcast = self.stop_sender.subscribe();
542542
runtime.spawn(async move {
543543
// We check every 30 secs whether our last broadcast is NODE_ANN_BCAST_INTERVAL away.
544+
#[cfg(not(test))]
544545
let mut interval = tokio::time::interval(Duration::from_secs(30));
546+
#[cfg(test)]
547+
let mut interval = tokio::time::interval(Duration::from_secs(5));
545548
loop {
546549
tokio::select! {
547550
_ = stop_bcast.changed() => {

0 commit comments

Comments
 (0)