From c13e135ade0bf8a0ddbb77ebc0b6d8c4272b8cec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Thu, 24 Oct 2024 17:19:48 +0200 Subject: [PATCH] tests: wait a bit for the copy operation Sending ctrl+shift+c only sends the copy request (XConvertSelection() call in vmside.c), it doesn't wait for the application to respond. Give it a moment for the copy to complete. --- qubes/tests/integ/basic.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qubes/tests/integ/basic.py b/qubes/tests/integ/basic.py index 9a2cf3c2f..b93e8e3f3 100644 --- a/qubes/tests/integ/basic.py +++ b/qubes/tests/integ/basic.py @@ -513,8 +513,10 @@ async def _test_clipboard(self, test_string, # this will be much better - at least because events will have # correct timestamp (so gui-daemon would not drop the copy request) subprocess.check_call(['xdotool', - 'key', 'ctrl+a', 'ctrl+c', 'ctrl+shift+c', - 'Escape']) + 'key', 'ctrl+a', 'ctrl+c', 'ctrl+shift+c']) + # copy operation is async, wait a bit before closing the window + await asyncio.sleep(1) + subprocess.check_call(['xdotool', 'Escape']) await self.wait_for_window_coro(window_title, show=False)