From 1117122d374d4b39605912765957ff2182803f70 Mon Sep 17 00:00:00 2001 From: Gilles Thouenon Date: Fri, 30 Sep 2022 09:37:07 +0200 Subject: [PATCH] Reintroduce karaf restart in tapi functional tests The tapi models import from upstream dependency reactivates a previous karaf issue we had when installing odl-transportpce-tapi feature. Some bundles can't restart. We need to logout karaf and log in again to be sure to have all bundles restarted properly. JIRA: TRNSPRTPCE-694 Signed-off-by: Gilles Thouenon Change-Id: I9354fdd3fde8780cfbc8288e4955185f547736cf --- tests/transportpce_tests/tapi/test01_abstracted_topology.py | 6 ++++++ tests/transportpce_tests/tapi/test02_full_topology.py | 6 ++++++ .../tapi/test03_tapi_device_change_notifications.py | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/tests/transportpce_tests/tapi/test01_abstracted_topology.py b/tests/transportpce_tests/tapi/test01_abstracted_topology.py index 9394a24ee..9f33dd822 100644 --- a/tests/transportpce_tests/tapi/test01_abstracted_topology.py +++ b/tests/transportpce_tests/tapi/test01_abstracted_topology.py @@ -152,6 +152,12 @@ class TransportTapitesting(unittest.TestCase): result = test_utils.install_karaf_feature("odl-transportpce-tapi") if result.returncode != 0: cls.init_failed = True + print("Restarting OpenDaylight...") + test_utils.shutdown_process(cls.processes[0]) + cls.processes[0] = test_utils.start_karaf() + test_utils.process_list[0] = cls.processes[0] + cls.init_failed = not test_utils.wait_until_log_contains( + test_utils.KARAF_LOG, test_utils.KARAF_OK_START_MSG, time_to_wait=60) if cls.init_failed: print("tapi installation feature failed...") test_utils.shutdown_process(cls.processes[0]) diff --git a/tests/transportpce_tests/tapi/test02_full_topology.py b/tests/transportpce_tests/tapi/test02_full_topology.py index ec8cc1e68..64ddc4394 100644 --- a/tests/transportpce_tests/tapi/test02_full_topology.py +++ b/tests/transportpce_tests/tapi/test02_full_topology.py @@ -109,6 +109,12 @@ class TransportPCEtesting(unittest.TestCase): result = test_utils.install_karaf_feature("odl-transportpce-tapi") if result.returncode != 0: cls.init_failed = True + print("Restarting OpenDaylight...") + test_utils.shutdown_process(cls.processes[0]) + cls.processes[0] = test_utils.start_karaf() + test_utils.process_list[0] = cls.processes[0] + cls.init_failed = not test_utils.wait_until_log_contains( + test_utils.KARAF_LOG, test_utils.KARAF_OK_START_MSG, time_to_wait=60) if cls.init_failed: print("tapi installation feature failed...") test_utils.shutdown_process(cls.processes[0]) diff --git a/tests/transportpce_tests/tapi/test03_tapi_device_change_notifications.py b/tests/transportpce_tests/tapi/test03_tapi_device_change_notifications.py index d6fc59e4b..2a4f3f292 100644 --- a/tests/transportpce_tests/tapi/test03_tapi_device_change_notifications.py +++ b/tests/transportpce_tests/tapi/test03_tapi_device_change_notifications.py @@ -118,6 +118,12 @@ class TransportPCEFulltesting(unittest.TestCase): result = test_utils.install_karaf_feature("odl-transportpce-tapi") if result.returncode != 0: cls.init_failed = True + print("Restarting OpenDaylight...") + test_utils.shutdown_process(cls.processes[0]) + cls.processes[0] = test_utils.start_karaf() + test_utils.process_list[0] = cls.processes[0] + cls.init_failed = not test_utils.wait_until_log_contains( + test_utils.KARAF_LOG, test_utils.KARAF_OK_START_MSG, time_to_wait=60) if cls.init_failed: print("tapi installation feature failed...") test_utils.shutdown_process(cls.processes[0]) -- 2.36.6