mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-23 17:34:00 +03:00
test-network: retry several times if expected LLDP info is not obtained
As LLDP thing does not get involved in the link status, `networkctl lldp` may not provide an expected information even if the link is in 'configured' state. Fixes #17360.
This commit is contained in:
parent
0de405873c
commit
f0d87798ea
@ -3429,10 +3429,16 @@ class NetworkdLLDPTests(unittest.TestCase, Utilities):
|
||||
start_networkd()
|
||||
self.wait_online(['veth99:degraded', 'veth-peer:degraded'])
|
||||
|
||||
for trial in range(10):
|
||||
if trial > 0:
|
||||
time.sleep(1)
|
||||
|
||||
output = check_output(*networkctl_cmd, 'lldp', env=env)
|
||||
print(output)
|
||||
self.assertRegex(output, 'veth-peer')
|
||||
self.assertRegex(output, 'veth99')
|
||||
if re.search(r'veth99 .* veth-peer', output):
|
||||
break
|
||||
else:
|
||||
self.fail()
|
||||
|
||||
class NetworkdRATests(unittest.TestCase, Utilities):
|
||||
links = ['veth99']
|
||||
|
Loading…
Reference in New Issue
Block a user