mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
test/infamy: wait for transport reachability after test_reset()
test_reset() triggers a config reload which causes services such as rousette to restart. Wait for the transport to become reachable again before returning from attach(), preventing subsequent API calls from racing with a still-restarting backend. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -166,6 +166,7 @@ class Env(object):
|
||||
yangdir=self.args.yangdir)
|
||||
if test_reset:
|
||||
dev.test_reset()
|
||||
util.until(lambda: self.is_reachable(node, cport), 30)
|
||||
return dev
|
||||
|
||||
if protocol == "ssh":
|
||||
@@ -181,6 +182,7 @@ class Env(object):
|
||||
yangdir=self.args.yangdir)
|
||||
if test_reset:
|
||||
dev.test_reset()
|
||||
util.until(lambda: self.is_reachable(node, cport), 30)
|
||||
return dev
|
||||
|
||||
raise Exception(f"Unsupported management procotol \"{protocol}\"")
|
||||
|
||||
Reference in New Issue
Block a user