Use SystemClock in EventCoalescer (#8317)

This PR updates the `EventCoalescer` to use the `SystemClock` trait to
abstract over the clock.

This allows us to test the advancement of time without relying on the
caller passing in the current time.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-02-23 20:07:13 -05:00 committed by GitHub
parent 9b44ba9382
commit e06ff5f507
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 62 additions and 47 deletions

View file

@ -96,7 +96,7 @@ impl Telemetry {
log_file: None,
is_staff: None,
first_event_date_time: None,
event_coalescer: EventCoalescer::new(),
event_coalescer: EventCoalescer::new(clock.clone()),
max_queue_size: MAX_QUEUE_LEN,
}));