Reintroduce karaf restart in tapi functional tests 12/102512/2
authorGilles Thouenon <gilles.thouenon@orange.com>
Fri, 30 Sep 2022 07:37:07 +0000 (09:37 +0200)
committerGilles Thouenon <gilles.thouenon@orange.com>
Fri, 30 Sep 2022 11:32:32 +0000 (11:32 +0000)
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 <gilles.thouenon@orange.com>
Change-Id: I9354fdd3fde8780cfbc8288e4955185f547736cf

tests/transportpce_tests/tapi/test01_abstracted_topology.py
tests/transportpce_tests/tapi/test02_full_topology.py
tests/transportpce_tests/tapi/test03_tapi_device_change_notifications.py

index 9394a24ee4831080254877aaacc52b21c79376e4..9f33dd822f3c9825818f96411a212d06ae0d57c2 100644 (file)
@@ -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])
index ec8cc1e68fb69dfe684b8b59b3e565a664787854..64ddc4394aaf18ebb88f6ba268ba8b65b6dd6c38 100644 (file)
@@ -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])
index d6fc59e4beb415f7c8398a550edc6788581df8ea..2a4f3f2925851ee1dc588861eb8ab7db9c89c81a 100644 (file)
@@ -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])