MCPcopy Create free account
hub / github.com/aws/clock-bound / handle_disruption

Function handle_disruption

clock-bound/src/daemon/clock_state/clock_adjust.rs:237–252  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

235
236 #[test]
237 fn handle_disruption() {
238 let disruption_marker = 123;
239 let expected_tx = Timex::clock_adjustment()
240 .phase_correction(Duration::from_secs(0))
241 .skew(Skew::from_ppm(0.0))
242 .call();
243 let mut mock_ntp_adj_time = MockNtpAdjTime::new();
244 mock_ntp_adj_time
245 .expect_ntp_adjtime()
246 .once()
247 .with(eq(expected_tx))
248 .return_once(|_| 0);
249
250 let mut clock_adjuster = ClockAdjuster::new(mock_ntp_adj_time);
251 clock_adjuster.handle_disruption(disruption_marker);
252 }
253
254 #[test]
255 #[should_panic]

Callers

nothing calls this directly

Calls 3

phase_correctionMethod · 0.80
newFunction · 0.50
handle_disruptionMethod · 0.45

Tested by

no test coverage detected