From 90e9aa9df41c3b99f9f1421227a1f1474622b918 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Fri, 13 Dec 2024 13:57:14 +0100 Subject: 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. --- smoketest/scripts/cli/test_protocols_ospf.py | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'smoketest/scripts/cli/test_protocols_ospf.py') 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) -- cgit v1.2.3