()
| 364 | |
| 365 | #[test] |
| 366 | fn test_record_event_updates_activity() { |
| 367 | let executor = make_test_executor(); |
| 368 | let old_time = std::time::SystemTime::now() |
| 369 | .duration_since(std::time::UNIX_EPOCH) |
| 370 | .unwrap() |
| 371 | .as_millis() as u64 |
| 372 | - 1_000; |
| 373 | executor.last_activity.store(old_time, Ordering::Relaxed); |
| 374 | |
| 375 | let before = executor.last_activity.load(Ordering::Relaxed); |
| 376 | executor.record_event(); |
| 377 | let after = executor.last_activity.load(Ordering::Relaxed); |
| 378 | |
| 379 | assert!(after > before); |
| 380 | assert!(executor.get_idle_duration_ms() < 1_000); |
| 381 | } |
nothing calls this directly
no test coverage detected