X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=tests%2Ftransportpce_tests%2F2.2.1%2Ftest_otn_renderer.py;h=f1a617365ec1ef0d53c9606216481a64a48d77bb;hb=4f3da80ad8db26626a9ecb14c0277431d4a4e416;hp=69eee8579fc0cafca609152608df71ec4e7fc0c9;hpb=14813c3a00068ad2b608a7986371923f8c3c01e9;p=transportpce.git diff --git a/tests/transportpce_tests/2.2.1/test_otn_renderer.py b/tests/transportpce_tests/2.2.1/test_otn_renderer.py index 69eee8579..f1a617365 100644 --- a/tests/transportpce_tests/2.2.1/test_otn_renderer.py +++ b/tests/transportpce_tests/2.2.1/test_otn_renderer.py @@ -28,27 +28,19 @@ def extract_a_from_b(a, b): class TransportPCEtesting(unittest.TestCase): - sim_process1 = None - odl_process = None + processes = None restconf_baseurl = "http://localhost:8181/restconf" @classmethod def setUpClass(cls): - cls.odl_process = test_utils.start_tpce() - cls.sim_process1 = test_utils.start_sim('spdrav2') + cls.processes = test_utils.start_tpce() + cls.processes = test_utils.start_sims(['spdrav2']) @classmethod def tearDownClass(cls): - for child in psutil.Process(cls.odl_process.pid).children(): - child.send_signal(signal.SIGINT) - child.wait() - cls.odl_process.send_signal(signal.SIGINT) - cls.odl_process.wait() - for child in psutil.Process(cls.sim_process1.pid).children(): - child.send_signal(signal.SIGINT) - child.wait() - cls.sim_process1.send_signal(signal.SIGINT) - cls.sim_process1.wait() + for process in cls.processes: + test_utils.shutdown_process(process) + print("all processes killed") def setUp(self): time.sleep(5)