From 93770b989f303a1f37143409f81e0f3e75ffa28a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Tue, 10 Dec 2024 18:36:41 +0400 Subject: [PATCH] rdp: check the display queue can be flushed too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marc-André Lureau --- qemu-rdp/src/server/display/queue.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qemu-rdp/src/server/display/queue.rs b/qemu-rdp/src/server/display/queue.rs index 91cc1c5..f118ad9 100644 --- a/qemu-rdp/src/server/display/queue.rs +++ b/qemu-rdp/src/server/display/queue.rs @@ -252,7 +252,7 @@ mod tests { #[test] fn test_capacity() { - let (tx, _rx) = DisplayQueue::new(); + let (tx, rx) = DisplayQueue::new(); crate::utils::block_on(async move { let ops = vec![DefaultPointer; QUEUE_CAPACITY]; for op in ops { @@ -262,7 +262,10 @@ mod tests { tx.push_update(DefaultPointer, false).await.unwrap(); }) .await - .unwrap_err() + .unwrap_err(); + for _ in 0..QUEUE_CAPACITY { + let _ = rx.recv().await; + } }); }