diff options
| author | Christian Breunig <christian@breunig.cc> | 2024-12-13 13:57:14 +0100 |
|---|---|---|
| committer | Christian Breunig <christian@breunig.cc> | 2024-12-16 22:24:50 +0100 |
| commit | 90e9aa9df41c3b99f9f1421227a1f1474622b918 (patch) | |
| tree | fe046cf9358c4258faf00910401783ddfaf26747 /smoketest/scripts/cli/test_protocols_ospf.py | |
| parent | e803c5e1a8828a1a3f8fb2c15b9ddbc232e12eea (diff) | |
| download | veeos-1x-90e9aa9df41c3b99f9f1421227a1f1474622b918.tar.gz veeos-1x-90e9aa9df41c3b99f9f1421227a1f1474622b918.zip | |
frr: T6746: add guard time after cli_commit() and before getFRRconfig()
As vyos-configd will take care about the commit via FRRender class, and FRR
needs to internally process the configuration we might read it back via vtysh
"to fast". Add a 5 seconds guard timer after each cli_commit() and before
calling getFRRconfig().
Guard timer is reset every time, cli_commit() is called.
Diffstat (limited to 'smoketest/scripts/cli/test_protocols_ospf.py')
| -rwxr-xr-x | smoketest/scripts/cli/test_protocols_ospf.py | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/smoketest/scripts/cli/test_protocols_ospf.py b/smoketest/scripts/cli/test_protocols_ospf.py index 2bc9cf2a5..599bf3930 100755 --- a/smoketest/scripts/cli/test_protocols_ospf.py +++ b/smoketest/scripts/cli/test_protocols_ospf.py @@ -570,23 +570,7 @@ class TestProtocolsOSPF(VyOSUnitTestSHIM.TestCase): self.cli_commit() # Verify FRR ospfd configuration - frrconfig = self.getFRRconfig('router ospf', endsection='^exit', daemon=ospf_daemon) - # Required to prevent the race condition T6761 - retry_count = 0 - max_retries = 60 - - while not frrconfig and retry_count < max_retries: - # Log every 10 seconds - if retry_count % 10 == 0: - print(f"Attempt {retry_count}: FRR config is still empty. Retrying...") - - retry_count += 1 - sleep(1) - frrconfig = self.getFRRconfig('router ospf', endsection='^exit', daemon=ospf_daemon) - - if not frrconfig: - print("Failed to retrieve FRR config after 60 seconds") - + frrconfig = self.getFRRconfig('router ospf', endsection='^exit', daemon=ospf_daemon, empty_retry=60) self.assertIn(f'router ospf', frrconfig) self.assertIn(f' network {network} area {area1}', frrconfig) |
