From fc7e1d0745d64a92b46cd654403fd8b1eac733fe Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Mon, 1 Sep 2025 16:14:32 +0200 Subject: [PATCH] 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 --- test/case/infix_containers/container_basic/test.py | 6 +++--- test/case/infix_containers/container_bridge/test.py | 2 +- test/case/infix_containers/container_firewall_basic/test.py | 4 ++-- test/case/infix_containers/container_host_commands/test.py | 4 ++-- test/case/infix_containers/container_phys/test.py | 4 ++-- test/case/infix_containers/container_veth/test.py | 2 +- test/case/infix_containers/container_volume/test.py | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/test/case/infix_containers/container_basic/test.py b/test/case/infix_containers/container_basic/test.py index 6fce60cd..7c67a9fa 100755 --- a/test/case/infix_containers/container_basic/test.py +++ b/test/case/infix_containers/container_basic/test.py @@ -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() diff --git a/test/case/infix_containers/container_bridge/test.py b/test/case/infix_containers/container_bridge/test.py index 4c070d1c..66584988 100755 --- a/test/case/infix_containers/container_bridge/test.py +++ b/test/case/infix_containers/container_bridge/test.py @@ -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) diff --git a/test/case/infix_containers/container_firewall_basic/test.py b/test/case/infix_containers/container_firewall_basic/test.py index 0f1c9d0a..d9252a70 100755 --- a/test/case/infix_containers/container_firewall_basic/test.py +++ b/test/case/infix_containers/container_firewall_basic/test.py @@ -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" diff --git a/test/case/infix_containers/container_host_commands/test.py b/test/case/infix_containers/container_host_commands/test.py index f2dbe912..3cc76668 100755 --- a/test/case/infix_containers/container_host_commands/test.py +++ b/test/case/infix_containers/container_host_commands/test.py @@ -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() diff --git a/test/case/infix_containers/container_phys/test.py b/test/case/infix_containers/container_phys/test.py index 48964cb3..1459444f 100755 --- a/test/case/infix_containers/container_phys/test.py +++ b/test/case/infix_containers/container_phys/test.py @@ -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() diff --git a/test/case/infix_containers/container_veth/test.py b/test/case/infix_containers/container_veth/test.py index 408c5bb1..fb72c47c 100755 --- a/test/case/infix_containers/container_veth/test.py +++ b/test/case/infix_containers/container_veth/test.py @@ -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) diff --git a/test/case/infix_containers/container_volume/test.py b/test/case/infix_containers/container_volume/test.py index c8f5d1e0..95be8fe0 100755 --- a/test/case/infix_containers/container_volume/test.py +++ b/test/case/infix_containers/container_volume/test.py @@ -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()