Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Commit c1326ac

Browse files
committed
Up the time to sleep so that ticks are generated
1 parent 513a1ad commit c1326ac

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/historian.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -171,17 +171,18 @@ mod tests {
171171
#[test]
172172
fn test_ticking_historian() {
173173
let zero = Sha256Hash::default();
174-
let hist = Historian::new(&zero, Some(2));
175-
sleep(Duration::from_millis(3));
174+
let hist = Historian::new(&zero, Some(20));
175+
sleep(Duration::from_millis(30));
176176
hist.sender.send(Event::UserDataKey(zero)).unwrap();
177-
sleep(Duration::from_millis(1));
177+
sleep(Duration::from_millis(15));
178178
drop(hist.sender);
179179
assert_eq!(
180180
hist.thread_hdl.join().unwrap().1,
181181
ExitReason::RecvDisconnected
182182
);
183183

184184
let entries: Vec<Entry> = hist.receiver.iter().collect();
185+
assert!(entries.len() > 1);
185186
assert!(verify_slice(&entries, &zero));
186187
}
187188
}

0 commit comments

Comments
 (0)