rdp: check the display queue can be flushed too

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau 2024-12-10 18:36:41 +04:00
parent 11c983a0f3
commit 93770b989f

View File

@ -252,7 +252,7 @@ mod tests {
#[test] #[test]
fn test_capacity() { fn test_capacity() {
let (tx, _rx) = DisplayQueue::new(); let (tx, rx) = DisplayQueue::new();
crate::utils::block_on(async move { crate::utils::block_on(async move {
let ops = vec![DefaultPointer; QUEUE_CAPACITY]; let ops = vec![DefaultPointer; QUEUE_CAPACITY];
for op in ops { for op in ops {
@ -262,7 +262,10 @@ mod tests {
tx.push_update(DefaultPointer, false).await.unwrap(); tx.push_update(DefaultPointer, false).await.unwrap();
}) })
.await .await
.unwrap_err() .unwrap_err();
for _ in 0..QUEUE_CAPACITY {
let _ = rx.recv().await;
}
}); });
} }