From 6ff44c571bb3c9bc810afcb7d7f9ea72c713e37d Mon Sep 17 00:00:00 2001 From: Reno Reckling Date: Tue, 13 Sep 2016 00:07:48 +0300 Subject: [PATCH] mumble: fix failing vm tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit modify tests to not fail if the event handlers are registered too slowly or if the wrong window is in focus (cherry picked from commit e087b0d12f97604ee1fdd09ef3d78b772c12468e) Signed-off-by: Domen Kožar --- nixos/tests/mumble.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/nixos/tests/mumble.nix b/nixos/tests/mumble.nix index 35f44002699..7959b85a0cf 100644 --- a/nixos/tests/mumble.nix +++ b/nixos/tests/mumble.nix @@ -36,18 +36,29 @@ in # cancel client audio configuration $client1->waitForWindow(qr/Audio Tuning Wizard/); $client2->waitForWindow(qr/Audio Tuning Wizard/); + $server->sleep(5); # wait because mumble is slow to register event handlers $client1->sendKeys("esc"); $client2->sendKeys("esc"); # cancel client cert configuration $client1->waitForWindow(qr/Certificate Management/); $client2->waitForWindow(qr/Certificate Management/); + $server->sleep(5); # wait because mumble is slow to register event handlers $client1->sendKeys("esc"); $client2->sendKeys("esc"); # accept server certificate $client1->waitForWindow(qr/^Mumble$/); $client2->waitForWindow(qr/^Mumble$/); + $server->sleep(5); # wait because mumble is slow to register event handlers + $client1->sendChars("y"); + $client2->sendChars("y"); + $server->sleep(5); # wait because mumble is slow to register event handlers + + # sometimes the wrong of the 2 windows is focused, we switch focus and try pressing "y" again + $client1->sendKeys("alt-tab"); + $client2->sendKeys("alt-tab"); + $server->sleep(5); # wait because mumble is slow to register event handlers $client1->sendChars("y"); $client2->sendChars("y");