Commit 6ae885c0 authored by intrigeri's avatar intrigeri
Browse files

Test suite: don't hammer resources of the system under test while installing/removing packages

I see every such dpkg|grep call takes about 0.3 seconds on lizard,
i.e. 30% of the 1 second default delay between checks,
which I suspect is enough to slow down the package installation/removal
we're exercising.
parent dd0274a7
......@@ -56,7 +56,7 @@ When /^I update APT using apt$/ do
end
def wait_for_package_installation(package)
try_for(2 * 60) do
try_for(2 * 60, delay: 3) do
$vm.execute_successfully("dpkg -s '#{package}' 2>/dev/null " \
"| grep -qs '^Status:.*installed$'")
end
......@@ -81,7 +81,7 @@ Then /^I install "(.+)" using apt$/ do |package|
end
def wait_for_package_removal(package)
try_for(3 * 60) do
try_for(3 * 60, delay: 3) do
# Once purged, a package is removed from the installed package status
# database and "dpkg -s" returns a non-zero exit code
!$vm.execute("dpkg -s #{package}").success?
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment