3
0
Fork 0
forked from mirrors/nixpkgs

mumble: fix failing vm tests

modify tests to not fail if the event handlers are
registered too slowly or if the wrong window is in focus
This commit is contained in:
Reno Reckling 2016-09-13 00:07:48 +03:00
parent f11be0f067
commit e087b0d12f

View file

@ -36,18 +36,29 @@ in
# cancel client audio configuration # cancel client audio configuration
$client1->waitForWindow(qr/Audio Tuning Wizard/); $client1->waitForWindow(qr/Audio Tuning Wizard/);
$client2->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"); $client1->sendKeys("esc");
$client2->sendKeys("esc"); $client2->sendKeys("esc");
# cancel client cert configuration # cancel client cert configuration
$client1->waitForWindow(qr/Certificate Management/); $client1->waitForWindow(qr/Certificate Management/);
$client2->waitForWindow(qr/Certificate Management/); $client2->waitForWindow(qr/Certificate Management/);
$server->sleep(5); # wait because mumble is slow to register event handlers
$client1->sendKeys("esc"); $client1->sendKeys("esc");
$client2->sendKeys("esc"); $client2->sendKeys("esc");
# accept server certificate # accept server certificate
$client1->waitForWindow(qr/^Mumble$/); $client1->waitForWindow(qr/^Mumble$/);
$client2->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"); $client1->sendChars("y");
$client2->sendChars("y"); $client2->sendChars("y");