Skip to content

Commit

Permalink
Add test coverage for next_event_async
Browse files Browse the repository at this point in the history
  • Loading branch information
tnull committed Jan 3, 2024
1 parent 4ddd053 commit 65bd915
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -828,8 +828,8 @@ mod tests {
use super::*;
use lightning::util::test_utils::{TestLogger, TestStore};

#[test]
fn event_queue_persistence() {
#[tokio::test]
async fn event_queue_persistence() {
let store = Arc::new(TestStore::new(false));
let logger = Arc::new(TestLogger::new());
let event_queue = EventQueue::new(Arc::clone(&store), Arc::clone(&logger));
Expand All @@ -845,6 +845,7 @@ mod tests {
// Check we get the expected event and that it is returned until we mark it handled.
for _ in 0..5 {
assert_eq!(event_queue.wait_next_event(), expected_event);
assert_eq!(event_queue.next_event_async().await, expected_event);
assert_eq!(event_queue.next_event(), Some(expected_event.clone()));
}

Expand Down

0 comments on commit 65bd915

Please sign in to comment.