diff options
author | Christian Breunig <christian@breunig.cc> | 2023-12-19 06:51:42 +0100 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2023-12-19 15:48:17 +0100 |
commit | 5b0c7bbf8c82a0e68462e035add6a3c9da988b29 (patch) | |
tree | eff78362fa400c4f6fabc07a55d9ae6468922ebc /smoketest/scripts/cli | |
parent | 33225eebde7ebcde84517f14077f5e61578f7231 (diff) | |
download | vyos-1x-5b0c7bbf8c82a0e68462e035add6a3c9da988b29.tar.gz vyos-1x-5b0c7bbf8c82a0e68462e035add6a3c9da988b29.zip |
smoketest: bgp: T4163: add explicit timeout when starting BMP
(cherry picked from commit 259a3d637081fad9f86a8edb39814d8f0fbf7b95)
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-x | smoketest/scripts/cli/test_protocols_bgp.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/smoketest/scripts/cli/test_protocols_bgp.py b/smoketest/scripts/cli/test_protocols_bgp.py index 8102a3153..4697d4970 100755 --- a/smoketest/scripts/cli/test_protocols_bgp.py +++ b/smoketest/scripts/cli/test_protocols_bgp.py @@ -15,7 +15,9 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. import unittest + from subprocess import run +from time import sleep from base_vyostest_shim import VyOSUnitTestSHIM @@ -1160,13 +1162,12 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase): mirror_buffer = '32000000' bmp_path = base_path + ['bmp'] target_path = bmp_path + ['target', target_name] - bgpd_bmp_pid = process_named_running('bgpd', 'bmp') command = ['/opt/vyatta/bin/vyatta-op-cmd-wrapper', 'restart', 'bgp'] self.cli_set(bmp_path) # by default the 'bmp' module not loaded for the bgpd # expect Error - if not bgpd_bmp_pid: + if not process_named_running('bgpd', 'bmp'): with self.assertRaises(ConfigSessionError): self.cli_commit() @@ -1174,8 +1175,12 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase): self.cli_delete(bmp_path) self.cli_set(['system', 'frr', 'bmp']) self.cli_commit() + # restart bgpd to apply "-M bmp" and update PID run(command, input='Y', text=True) + # let the bgpd process recover + sleep(10) + # update daemon PID - this was a planned daemon restart self.daemon_pid = process_named_running(PROCESS_NAME) # set bmp config but not set address |