You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
os-autoinst/0001-Slower-default-typing-...

73 lines
2.8 KiB

From 8115d074e974e815a20a0e426a5ffb0b43a1a4c9 Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Tue, 15 Aug 2017 10:48:43 -0700
Subject: [PATCH] Slower default typing speed
Suddenly Fedora tests are failing all over the place with typing
errors. I have no idea why, but slowing down typing will, I
hope!, work around the problem for now.
---
t/03-testapi.t | 12 ++++++------
testapi.pm | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/t/03-testapi.t b/t/03-testapi.t
index 1cc75de..7dc5d82 100755
--- a/t/03-testapi.t
+++ b/t/03-testapi.t
@@ -76,7 +76,7 @@ sub fake_wait_screen_change(&@) {
$mod2->mock(wait_screen_change => \&fake_wait_screen_change);
type_string 'hallo';
-is_deeply($cmds, [{cmd => 'backend_type_string', max_interval => 250, text => 'hallo'}]);
+is_deeply($cmds, [{cmd => 'backend_type_string', max_interval => 150, text => 'hallo'}]);
$cmds = [];
type_string 'hallo', 4;
@@ -84,7 +84,7 @@ is_deeply($cmds, [{cmd => 'backend_type_string', max_interval => 4, text => 'hal
$cmds = [];
type_string 'hallo', secret => 1;
-is_deeply($cmds, [{cmd => 'backend_type_string', max_interval => 250, text => 'hallo'}]);
+is_deeply($cmds, [{cmd => 'backend_type_string', max_interval => 150, text => 'hallo'}]);
$cmds = [];
type_string 'hallo', secret => 1, max_interval => 10;
@@ -92,16 +92,16 @@ is_deeply($cmds, [{cmd => 'backend_type_string', max_interval => 10, text => 'ha
$cmds = [];
type_string 'hallo', wait_screen_change => 3;
-is_deeply($cmds, [{cmd => 'backend_type_string', max_interval => 250, text => 'hal'}, {cmd => 'backend_type_string', max_interval => 250, text => 'lo'},]);
+is_deeply($cmds, [{cmd => 'backend_type_string', max_interval => 150, text => 'hal'}, {cmd => 'backend_type_string', max_interval => 150, text => 'lo'},]);
$cmds = [];
type_string 'hallo', wait_screen_change => 2;
is_deeply(
$cmds,
[
- {cmd => 'backend_type_string', max_interval => 250, text => 'ha'},
- {cmd => 'backend_type_string', max_interval => 250, text => 'll'},
- {cmd => 'backend_type_string', max_interval => 250, text => 'o'},
+ {cmd => 'backend_type_string', max_interval => 150, text => 'ha'},
+ {cmd => 'backend_type_string', max_interval => 150, text => 'll'},
+ {cmd => 'backend_type_string', max_interval => 150, text => 'o'},
]);
$cmds = [];
diff --git a/testapi.pm b/testapi.pm
index eabc411..2616e16 100755
--- a/testapi.pm
+++ b/testapi.pm
@@ -1121,7 +1121,7 @@ sub type_string {
return;
}
- my $max_interval = $args{max_interval} // 250;
+ my $max_interval = $args{max_interval} // 150;
my $wait = $args{wait_screen_change} // 0;
bmwqemu::log_call(string => $log, max_interval => $max_interval, wait_screen_changes => $wait);
if ($wait) {
--
2.14.1