Skip to content

Commit b873112

Browse files
committed
smoketest: bgp: T4163: use explicit kill to respawn bgpd process
1 parent 259a3d6 commit b873112

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

smoketest/scripts/cli/test_protocols_bgp.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
import unittest
1818

19-
from subprocess import run
2019
from time import sleep
2120

2221
from base_vyostest_shim import VyOSUnitTestSHIM
@@ -25,6 +24,7 @@
2524
from vyos.configsession import ConfigSessionError
2625
from vyos.template import is_ipv6
2726
from vyos.utils.process import process_named_running
27+
from vyos.utils.process import cmd
2828

2929
PROCESS_NAME = 'bgpd'
3030
ASN = '64512'
@@ -1162,11 +1162,9 @@ def test_bgp_25_bmp(self):
11621162
mirror_buffer = '32000000'
11631163
bmp_path = base_path + ['bmp']
11641164
target_path = bmp_path + ['target', target_name]
1165-
command = ['/opt/vyatta/bin/vyatta-op-cmd-wrapper', 'restart', 'bgp']
11661165

1166+
# by default the 'bmp' module not loaded for the bgpd expect Error
11671167
self.cli_set(bmp_path)
1168-
# by default the 'bmp' module not loaded for the bgpd
1169-
# expect Error
11701168
if not process_named_running('bgpd', 'bmp'):
11711169
with self.assertRaises(ConfigSessionError):
11721170
self.cli_commit()
@@ -1177,7 +1175,7 @@ def test_bgp_25_bmp(self):
11771175
self.cli_commit()
11781176

11791177
# restart bgpd to apply "-M bmp" and update PID
1180-
run(command, input='Y', text=True)
1178+
cmd(f'sudo kill -9 {self.daemon_pid}')
11811179
# let the bgpd process recover
11821180
sleep(10)
11831181
# update daemon PID - this was a planned daemon restart

0 commit comments

Comments
 (0)