summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli/base_vyostest_shim.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-08-14 20:40:28 +0200
committerChristian Poessinger <christian@poessinger.com>2021-08-15 15:26:26 +0200
commitdae0fb64426ae752bab3c3023b1697282b0ffd4e (patch)
tree87c670dde98f50c7328f8701686a49949a1176f2 /smoketest/scripts/cli/base_vyostest_shim.py
parent69ec102365ee60a476ba750b7ca7d4c26e2e72fa (diff)
downloadvyos-1x-dae0fb64426ae752bab3c3023b1697282b0ffd4e.tar.gz
vyos-1x-dae0fb64426ae752bab3c3023b1697282b0ffd4e.zip
smoketest: shim: remove superfluous sleep() in getFRRconfig()
The sleep was intended to handle a FRR issue where the config was/is somehow now available in vtysh even with the commit was done. This rather feels like a race-condition and is fixed in the subsequent commit. (cherry picked from commit e7d841d2854d8e0ebb95cb6f0bd83e84fba3a9fa)
Diffstat (limited to 'smoketest/scripts/cli/base_vyostest_shim.py')
-rw-r--r--smoketest/scripts/cli/base_vyostest_shim.py16
1 files changed, 4 insertions, 12 deletions
diff --git a/smoketest/scripts/cli/base_vyostest_shim.py b/smoketest/scripts/cli/base_vyostest_shim.py
index 18e4e567e..f851852de 100644
--- a/smoketest/scripts/cli/base_vyostest_shim.py
+++ b/smoketest/scripts/cli/base_vyostest_shim.py
@@ -74,17 +74,9 @@ class VyOSUnitTestSHIM:
def getFRRconfig(self, string, end='$'):
""" Retrieve current "running configuration" from FRR """
command = f'vtysh -c "show run" | sed -n "/^{string}{end}/,/^!/p"'
-
- count = 0
- tmp = ''
- while count < 10 and tmp == '':
- # Let FRR settle after a config change first before harassing it again
- sleep(1)
- tmp = cmd(command)
- count += 1
-
- if self.debug or tmp == '':
+ out = cmd(command)
+ if self.debug:
import pprint
print(f'\n\ncommand "{command}" returned:\n')
- pprint.pprint(tmp)
- return tmp
+ pprint.pprint(out)
+ return out