summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranonym <anonym@riseup.net>2019-10-14 10:21:34 +0200
committeranonym <anonym@riseup.net>2019-10-14 10:21:34 +0200
commit92869c4e9b8e4370bbdbae76b22c0e3e43f913e5 (patch)
tree015d8c3d353940e0067fef4c0b78bf4cef91a249
parent8405ba215ef58306f4fe2a0ede630ee0272666a1 (diff)
Revert "Test suite: wait for the remote shell a bit longer after restoring a snapshot."wip/11888-remote-shell-virtio-transport
This reverts commit 8405ba215ef58306f4fe2a0ede630ee0272666a1. Waiting longer doesn't help: [...] Restoring snapshot 'no-network-logged-in'... Remote shell: calling as root: echo 'hello?' The remote shell failed to respond within 30 seconds The remote shell is down after restoring snapshot. Retrying... (attempt 1 of 3) [...]
-rw-r--r--features/support/helpers/vm_helper.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/features/support/helpers/vm_helper.rb b/features/support/helpers/vm_helper.rb
index 404a33b..10d9a53 100644
--- a/features/support/helpers/vm_helper.rb
+++ b/features/support/helpers/vm_helper.rb
@@ -480,8 +480,9 @@ class VM
return execute(cmd, options)
end
- def remote_shell_is_up?(timeout = 3)
+ def remote_shell_is_up?
msg = 'hello?'
+ timeout = 3
Timeout::timeout(timeout) do
execute_successfully("echo '#{msg}'").stdout.chomp == msg
end
@@ -694,7 +695,7 @@ EOF
# In #11888 we made the remote shell move from serial transport to
# virtio. Since then we've occassionally seen the remote shell not
# responding after restoring a snapshot.
- if not($vm.remote_shell_is_up?(30))
+ if not($vm.remote_shell_is_up?)
@restore_snapshot_tries ||= 0
@restore_snapshot_tries += 1
if @restore_snapshot_tries <= 3