Skip to content

Commit b29c158

Browse files
test(iroh): fix flaky test_active_relay_inactive
1 parent b45ae27 commit b29c158

File tree

1 file changed

+4
-4
lines changed
  • iroh/src/magicsock/transports/relay

1 file changed

+4
-4
lines changed

iroh/src/magicsock/transports/relay/actor.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ impl ActiveRelayActor {
645645
}
646646
}
647647
_ = &mut self.inactive_timeout, if !self.is_home_relay => {
648-
debug!("Inactive for {RELAY_INACTIVE_CLEANUP_TIME:?}, exiting.");
648+
debug!("Inactive for {RELAY_INACTIVE_CLEANUP_TIME:?}, exiting (running).");
649649
break Ok(());
650650
}
651651
}
@@ -777,7 +777,7 @@ impl ActiveRelayActor {
777777
}
778778
}
779779
_ = &mut self.inactive_timeout, if !self.is_home_relay => {
780-
debug!("Inactive for {RELAY_INACTIVE_CLEANUP_TIME:?}, exiting.");
780+
debug!("Inactive for {RELAY_INACTIVE_CLEANUP_TIME:?}, exiting (sending).");
781781
break Ok(());
782782
}
783783
}
@@ -1532,14 +1532,14 @@ mod tests {
15321532
info!("Stepping time forwards by RELAY_INACTIVE_CLEANUP_TIME");
15331533
tokio::time::advance(RELAY_INACTIVE_CLEANUP_TIME).await;
15341534
assert!(
1535-
tokio::time::timeout(Duration::from_millis(100), task)
1535+
tokio::time::timeout(Duration::from_millis(1000), task)
15361536
.await
15371537
.is_ok(),
15381538
"actor task still running"
15391539
);
15401540

1541+
tokio::time::resume();
15411542
cancel_token.cancel();
1542-
15431543
Ok(())
15441544
}
15451545

0 commit comments

Comments
 (0)