From 176f974d1c50aae44ec985467aa37f01ca6e0169 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Thu, 12 Dec 2024 21:07:10 +0100 Subject: smoketest: T6746: add 2 second guard timer for getFRRconfig() Sometimes FRR needs some time after reloading the configuration to appear in vtysh. This is a workaround addiung a 2 second guard timer. --- smoketest/scripts/cli/base_vyostest_shim.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/smoketest/scripts/cli/base_vyostest_shim.py b/smoketest/scripts/cli/base_vyostest_shim.py index a383e596c..affa53877 100644 --- a/smoketest/scripts/cli/base_vyostest_shim.py +++ b/smoketest/scripts/cli/base_vyostest_shim.py @@ -103,6 +103,9 @@ class VyOSUnitTestSHIM: def getFRRconfig(self, string=None, end='$', endsection='^!', daemon=''): """ Retrieve current "running configuration" from FRR """ + # Sometimes FRR needs some time after reloading the configuration to + # appear in vtysh. This is a workaround addiung a 2 seconds guard timer + sleep(2) command = f'vtysh -c "show run {daemon} no-header"' if string: command += f' | sed -n "/^{string}{end}/,/{endsection}/p"' out = cmd(command) -- cgit v1.2.3