diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-08-14 20:40:28 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-08-14 20:40:30 +0200 |
commit | e7d841d2854d8e0ebb95cb6f0bd83e84fba3a9fa (patch) | |
tree | 55279339575811f6c9f68e771cdee75a1e05952e /smoketest/scripts/cli | |
parent | a74e67a778a6c698e44cbc6c5d184d03c9c12396 (diff) | |
download | vyos-1x-e7d841d2854d8e0ebb95cb6f0bd83e84fba3a9fa.tar.gz vyos-1x-e7d841d2854d8e0ebb95cb6f0bd83e84fba3a9fa.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.
Diffstat (limited to 'smoketest/scripts/cli')
-rw-r--r-- | smoketest/scripts/cli/base_vyostest_shim.py | 16 |
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 18e49f47f..c0665fa0c 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='$', endsection='^!'): """ Retrieve current "running configuration" from FRR """ command = f'vtysh -c "show run" | sed -n "/^{string}{end}/,/{endsection}/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 |