test/case/infix_containers: extend retry for containers

For a heavily loaded system, 10 seconds/retries is not enough time to
expect containers to have started up.  Particularly after the changes
done recently to do prune before and after a container is started.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2025-09-02 10:53:49 +02:00
parent 950a6ef794
commit fc7e1d0745
7 changed files with 13 additions and 13 deletions
@@ -54,7 +54,7 @@ with infamy.Test() as test:
with test.step("Verify container 'web' has started"):
c = infamy.Container(target)
until(lambda: c.running(NAME), attempts=10)
until(lambda: c.running(NAME), attempts=60)
with test.step("Verify container 'web' is reachable on http://container-host.local:91"):
until(lambda: _verify(addr), attempts=10)
@@ -64,12 +64,12 @@ with infamy.Test() as test:
c.action(NAME, "stop")
with test.step("Verify container 'web' is stopped"):
until(lambda: not c.running(NAME), attempts=10)
until(lambda: not c.running(NAME), attempts=30)
with test.step("Restart container 'web'"):
c.action(NAME, "restart")
with test.step("Verify container 'web' is reachable on http://container-host.local:91"):
# Wait for it to restart and respond, or fail
until(lambda: _verify(addr), attempts=10)
until(lambda: _verify(addr), attempts=60)
test.succeed()
@@ -78,7 +78,7 @@ with infamy.Test() as test:
with test.step("Verify container has started"):
c = infamy.Container(target)
until(lambda: c.running(NAME), attempts=10)
until(lambda: c.running(NAME), attempts=60)
_, hport = env.ltop.xlate("host", "data")
url = infamy.Furl(URL)
@@ -176,11 +176,11 @@ table ip nat {
with test.step("Verify firewall container has started"):
c = infamy.Container(target)
until(lambda: c.running(NFTNM), attempts=10)
until(lambda: c.running(NFTNM), attempts=60)
with test.step("Verify web container has started"):
c = infamy.Container(target)
until(lambda: c.running(WEBNM), attempts=10)
until(lambda: c.running(WEBNM), attempts=60)
with infamy.IsolatedMacVlan(hport) as ns:
NEEDLE = "tiny web server from the curiOS docker"
@@ -72,8 +72,8 @@ nsenter -m/1/ns/mnt -u/1/ns/uts -i/1/ns/ipc -n/1/ns/net hostname {hostname_new}
with test.step("Verify container has started"):
c = infamy.Container(target)
until(lambda: c.running(cont_name), attempts=10)
until(lambda: c.running(cont_name), attempts=60)
with test.step("Verify the new hostname set by the container"):
until(lambda: c.running(cont_name) != target.get_data("/ietf-system:system")["system"]["hostname"], attempts=10)
until(lambda: c.running(cont_name) != target.get_data("/ietf-system:system")["system"]["hostname"], attempts=30)
test.succeed()
@@ -57,7 +57,7 @@ with infamy.Test() as test:
with test.step("Verify container has started"):
c = infamy.Container(target)
until(lambda: c.running(NAME), attempts=10)
until(lambda: c.running(NAME), attempts=60)
_, hport = env.ltop.xlate("host", "data")
url = infamy.Furl(URL)
@@ -88,6 +88,6 @@ with infamy.Test() as test:
})
with test.step("Verify server is restarted and returns new content"):
until(lambda: url.nscheck(ns, MESG), attempts=10)
until(lambda: url.nscheck(ns, MESG), attempts=60)
test.succeed()
@@ -94,7 +94,7 @@ with infamy.Test() as test:
with test.step("Verify container 'web-br0-veth' has started"):
c = infamy.Container(target)
until(lambda: c.running(NAME), attempts=10)
until(lambda: c.running(NAME), attempts=60)
_, hport = env.ltop.xlate("host", "data")
url = infamy.Furl(URL)
@@ -46,7 +46,7 @@ with infamy.Test() as test:
with test.step("Verify container has started"):
c = infamy.Container(target)
until(lambda: c.running(NAME), attempts=10)
until(lambda: c.running(NAME), attempts=60)
with test.step("Modify container volume content"):
cmd = f"sudo container shell {NAME} 'echo {MESG} >/var/www/index.html'"
@@ -66,6 +66,6 @@ with infamy.Test() as test:
# print(f"Container {NAME} upgraded: {out.stdout}")
with test.step("Verify container volume content survived upgrade"):
until(lambda: url.check(MESG), attempts=10)
until(lambda: url.check(MESG), attempts=60)
test.succeed()