From b2a374a78b74ff41c2d37bb936942ea036268de0 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Thu, 25 Jul 2024 03:45:57 +1000 Subject: [PATCH] test(connlib): add comment explaining position of `handle_timeout` (#6012) Feedback from #5948. --- rust/connlib/tunnel/src/tests/sut.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/rust/connlib/tunnel/src/tests/sut.rs b/rust/connlib/tunnel/src/tests/sut.rs index a43974993..ea40c2308 100644 --- a/rust/connlib/tunnel/src/tests/sut.rs +++ b/rust/connlib/tunnel/src/tests/sut.rs @@ -350,6 +350,7 @@ impl TunnelTest { let cut_off = self.flux_capacitor.now::() + Duration::from_secs(10); 'outer: while self.flux_capacitor.now::() < cut_off { + // `handle_timeout` needs to be called at the very top to advance state after we have made other modifications. self.handle_timeout(&ref_state.global_dns_records, buffered_transmits); let now = self.flux_capacitor.now();