Skip to content

Commit fc7e1d0

Browse files
committed
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 <[email protected]>
1 parent 950a6ef commit fc7e1d0

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

test/case/infix_containers/container_basic/test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def _verify(server):
5454

5555
with test.step("Verify container 'web' has started"):
5656
c = infamy.Container(target)
57-
until(lambda: c.running(NAME), attempts=10)
57+
until(lambda: c.running(NAME), attempts=60)
5858

5959
with test.step("Verify container 'web' is reachable on http://container-host.local:91"):
6060
until(lambda: _verify(addr), attempts=10)
@@ -64,12 +64,12 @@ def _verify(server):
6464
c.action(NAME, "stop")
6565

6666
with test.step("Verify container 'web' is stopped"):
67-
until(lambda: not c.running(NAME), attempts=10)
67+
until(lambda: not c.running(NAME), attempts=30)
6868

6969
with test.step("Restart container 'web'"):
7070
c.action(NAME, "restart")
7171

7272
with test.step("Verify container 'web' is reachable on http://container-host.local:91"):
7373
# Wait for it to restart and respond, or fail
74-
until(lambda: _verify(addr), attempts=10)
74+
until(lambda: _verify(addr), attempts=60)
7575
test.succeed()

test/case/infix_containers/container_bridge/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878

7979
with test.step("Verify container has started"):
8080
c = infamy.Container(target)
81-
until(lambda: c.running(NAME), attempts=10)
81+
until(lambda: c.running(NAME), attempts=60)
8282

8383
_, hport = env.ltop.xlate("host", "data")
8484
url = infamy.Furl(URL)

test/case/infix_containers/container_firewall_basic/test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,11 @@
176176

177177
with test.step("Verify firewall container has started"):
178178
c = infamy.Container(target)
179-
until(lambda: c.running(NFTNM), attempts=10)
179+
until(lambda: c.running(NFTNM), attempts=60)
180180

181181
with test.step("Verify web container has started"):
182182
c = infamy.Container(target)
183-
until(lambda: c.running(WEBNM), attempts=10)
183+
until(lambda: c.running(WEBNM), attempts=60)
184184

185185
with infamy.IsolatedMacVlan(hport) as ns:
186186
NEEDLE = "tiny web server from the curiOS docker"

test/case/infix_containers/container_host_commands/test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@
7272

7373
with test.step("Verify container has started"):
7474
c = infamy.Container(target)
75-
until(lambda: c.running(cont_name), attempts=10)
75+
until(lambda: c.running(cont_name), attempts=60)
7676

7777
with test.step("Verify the new hostname set by the container"):
78-
until(lambda: c.running(cont_name) != target.get_data("/ietf-system:system")["system"]["hostname"], attempts=10)
78+
until(lambda: c.running(cont_name) != target.get_data("/ietf-system:system")["system"]["hostname"], attempts=30)
7979
test.succeed()

test/case/infix_containers/container_phys/test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757

5858
with test.step("Verify container has started"):
5959
c = infamy.Container(target)
60-
until(lambda: c.running(NAME), attempts=10)
60+
until(lambda: c.running(NAME), attempts=60)
6161

6262
_, hport = env.ltop.xlate("host", "data")
6363
url = infamy.Furl(URL)
@@ -88,6 +88,6 @@
8888
})
8989

9090
with test.step("Verify server is restarted and returns new content"):
91-
until(lambda: url.nscheck(ns, MESG), attempts=10)
91+
until(lambda: url.nscheck(ns, MESG), attempts=60)
9292

9393
test.succeed()

test/case/infix_containers/container_veth/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494

9595
with test.step("Verify container 'web-br0-veth' has started"):
9696
c = infamy.Container(target)
97-
until(lambda: c.running(NAME), attempts=10)
97+
until(lambda: c.running(NAME), attempts=60)
9898

9999
_, hport = env.ltop.xlate("host", "data")
100100
url = infamy.Furl(URL)

test/case/infix_containers/container_volume/test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
with test.step("Verify container has started"):
4848
c = infamy.Container(target)
49-
until(lambda: c.running(NAME), attempts=10)
49+
until(lambda: c.running(NAME), attempts=60)
5050

5151
with test.step("Modify container volume content"):
5252
cmd = f"sudo container shell {NAME} 'echo {MESG} >/var/www/index.html'"
@@ -66,6 +66,6 @@
6666
# print(f"Container {NAME} upgraded: {out.stdout}")
6767

6868
with test.step("Verify container volume content survived upgrade"):
69-
until(lambda: url.check(MESG), attempts=10)
69+
until(lambda: url.check(MESG), attempts=60)
7070

7171
test.succeed()

0 commit comments

Comments
 (0)