From 4cb833c654bb1869411d97efdd7668614bcfe387 Mon Sep 17 00:00:00 2001 From: Gilles Thouenon Date: Sat, 25 Feb 2023 10:30:35 +0100 Subject: [PATCH] Speed up functional tests execution Some functional test suites remained configured with a rather long delay between each test. Homogenize the whole to a rather short value. Signed-off-by: Gilles Thouenon Change-Id: I082f82ac48b2e8530c008e311004ac52f0f0fd7c --- tests/transportpce_tests/1.2.1/test01_portmapping.py | 2 +- tests/transportpce_tests/1.2.1/test02_topo_portmapping.py | 2 +- tests/transportpce_tests/1.2.1/test03_topology.py | 2 +- .../1.2.1/test04_renderer_service_path_nominal.py | 2 +- tests/transportpce_tests/2.2.1/test02_topo_portmapping.py | 2 +- tests/transportpce_tests/2.2.1/test03_topology.py | 2 +- tests/transportpce_tests/2.2.1/test04_otn_topology.py | 2 +- tests/transportpce_tests/2.2.1/test05_flex_grid.py | 2 +- tests/transportpce_tests/2.2.1/test07_otn_renderer.py | 2 +- tests/transportpce_tests/2.2.1/test08_otn_sh_renderer.py | 5 ++++- tests/transportpce_tests/2.2.1/test11_otn_end2end.py | 2 +- tests/transportpce_tests/7.1/test02_otn_renderer.py | 2 +- tests/transportpce_tests/7.1/test03_renderer_or_modes.py | 2 +- tests/transportpce_tests/tapi/test02_full_topology.py | 2 +- 14 files changed, 17 insertions(+), 14 deletions(-) diff --git a/tests/transportpce_tests/1.2.1/test01_portmapping.py b/tests/transportpce_tests/1.2.1/test01_portmapping.py index 4e48bf63e..51446b762 100644 --- a/tests/transportpce_tests/1.2.1/test01_portmapping.py +++ b/tests/transportpce_tests/1.2.1/test01_portmapping.py @@ -43,7 +43,7 @@ class TransportPCEPortMappingTesting(unittest.TestCase): def setUp(self): # pylint: disable=consider-using-f-string print("execution of {}".format(self.id().split(".")[-1])) - time.sleep(10) + time.sleep(1) def test_01_rdm_device_connection(self): response = test_utils.mount_device("ROADMA01", ('roadma', self.NODE_VERSION)) diff --git a/tests/transportpce_tests/1.2.1/test02_topo_portmapping.py b/tests/transportpce_tests/1.2.1/test02_topo_portmapping.py index e88f125fd..d409cfa60 100644 --- a/tests/transportpce_tests/1.2.1/test02_topo_portmapping.py +++ b/tests/transportpce_tests/1.2.1/test02_topo_portmapping.py @@ -42,7 +42,7 @@ class TransportPCEtesting(unittest.TestCase): print("all processes killed") def setUp(self): - time.sleep(10) + time.sleep(2) # Connect the ROADMA def test_01_connect_rdm(self): diff --git a/tests/transportpce_tests/1.2.1/test03_topology.py b/tests/transportpce_tests/1.2.1/test03_topology.py index ed289d29f..36ca15501 100644 --- a/tests/transportpce_tests/1.2.1/test03_topology.py +++ b/tests/transportpce_tests/1.2.1/test03_topology.py @@ -110,7 +110,7 @@ class TransportPCETopologyTesting(unittest.TestCase): print("all processes killed") def setUp(self): - time.sleep(5) + time.sleep(2) def test_01_connect_ROADMA(self): response = test_utils.mount_device("ROADMA01", ('roadma', self.NODE_VERSION)) diff --git a/tests/transportpce_tests/1.2.1/test04_renderer_service_path_nominal.py b/tests/transportpce_tests/1.2.1/test04_renderer_service_path_nominal.py index 506dbf73c..f6b4d84ef 100644 --- a/tests/transportpce_tests/1.2.1/test04_renderer_service_path_nominal.py +++ b/tests/transportpce_tests/1.2.1/test04_renderer_service_path_nominal.py @@ -43,7 +43,7 @@ class TransportPCERendererTesting(unittest.TestCase): def setUp(self): # pylint: disable=consider-using-f-string print("execution of {}".format(self.id().split(".")[-1])) - time.sleep(10) + time.sleep(2) def test_01_rdm_device_connected(self): response = test_utils.mount_device("ROADMA01", ('roadma', self.NODE_VERSION)) diff --git a/tests/transportpce_tests/2.2.1/test02_topo_portmapping.py b/tests/transportpce_tests/2.2.1/test02_topo_portmapping.py index 326cb481d..20b7bc127 100644 --- a/tests/transportpce_tests/2.2.1/test02_topo_portmapping.py +++ b/tests/transportpce_tests/2.2.1/test02_topo_portmapping.py @@ -41,7 +41,7 @@ class TransportPCEtesting(unittest.TestCase): print("all processes killed") def setUp(self): - time.sleep(10) + time.sleep(2) # Connect the ROADMA def test_01_connect_rdm(self): diff --git a/tests/transportpce_tests/2.2.1/test03_topology.py b/tests/transportpce_tests/2.2.1/test03_topology.py index 838bb4c00..964ee8a4e 100644 --- a/tests/transportpce_tests/2.2.1/test03_topology.py +++ b/tests/transportpce_tests/2.2.1/test03_topology.py @@ -111,7 +111,7 @@ class TransportPCEtesting(unittest.TestCase): print("all processes killed") def setUp(self): - time.sleep(5) + time.sleep(2) def test_01_connect_ROADM_A1(self): response = test_utils.mount_device("ROADM-A1", ('roadma', self.NODE_VERSION)) diff --git a/tests/transportpce_tests/2.2.1/test04_otn_topology.py b/tests/transportpce_tests/2.2.1/test04_otn_topology.py index f7d953992..629c7a311 100644 --- a/tests/transportpce_tests/2.2.1/test04_otn_topology.py +++ b/tests/transportpce_tests/2.2.1/test04_otn_topology.py @@ -42,7 +42,7 @@ class TransportPCEtesting(unittest.TestCase): print("all processes killed") def setUp(self): - time.sleep(5) + time.sleep(2) def test_01_connect_SPDR_SA1(self): response = test_utils.mount_device("SPDR-SA1", ('spdra', self.NODE_VERSION)) diff --git a/tests/transportpce_tests/2.2.1/test05_flex_grid.py b/tests/transportpce_tests/2.2.1/test05_flex_grid.py index a2a6958d6..371e6fb91 100644 --- a/tests/transportpce_tests/2.2.1/test05_flex_grid.py +++ b/tests/transportpce_tests/2.2.1/test05_flex_grid.py @@ -42,7 +42,7 @@ class TransportPCEPortMappingTesting(unittest.TestCase): def setUp(self): # pylint: disable=consider-using-f-string print("execution of {}".format(self.id().split(".")[-1])) - time.sleep(10) + time.sleep(2) def test_01_rdm_device_connection(self): response = test_utils.mount_device("ROADM-D1", ('roadmd', self.NODE_VERSION)) diff --git a/tests/transportpce_tests/2.2.1/test07_otn_renderer.py b/tests/transportpce_tests/2.2.1/test07_otn_renderer.py index c27c5e8b7..eab96048e 100644 --- a/tests/transportpce_tests/2.2.1/test07_otn_renderer.py +++ b/tests/transportpce_tests/2.2.1/test07_otn_renderer.py @@ -53,7 +53,7 @@ class TransportPCEtesting(unittest.TestCase): print("all processes killed") def setUp(self): - time.sleep(5) + time.sleep(2) def test_01_connect_SPDR_SA1(self): response = test_utils.mount_device("SPDR-SA1", ('spdra', self.NODE_VERSION)) diff --git a/tests/transportpce_tests/2.2.1/test08_otn_sh_renderer.py b/tests/transportpce_tests/2.2.1/test08_otn_sh_renderer.py index effe77bb0..c3a1dfdeb 100644 --- a/tests/transportpce_tests/2.2.1/test08_otn_sh_renderer.py +++ b/tests/transportpce_tests/2.2.1/test08_otn_sh_renderer.py @@ -42,7 +42,7 @@ class TransportPCEtesting(unittest.TestCase): print("all processes killed") def setUp(self): - time.sleep(5) + time.sleep(2) def test_01_connect_SPDR_SA1(self): response = test_utils.mount_device("SPDR-SA1", ('spdra', self.NODE_VERSION)) @@ -166,6 +166,7 @@ class TransportPCEtesting(unittest.TestCase): self.assertEqual(response['status_code'], requests.codes.ok) self.assertIn('Operation Successful', response['output']['configuration-response-common']['response-message']) + time.sleep(2) # Test OCH-OTU interfaces on SPDR-A1 def test_04_check_interface_och(self): @@ -343,6 +344,7 @@ class TransportPCEtesting(unittest.TestCase): self.assertEqual(response['status_code'], requests.codes.ok) self.assertIn('Operation Successful', response['output']['configuration-response-common']['response-message']) + time.sleep(2) # Test ODU4 interfaces on SPDR-A1 and SPDR-C1 def test_09_check_interface_ODU4(self): @@ -499,6 +501,7 @@ class TransportPCEtesting(unittest.TestCase): self.assertEqual(response['status_code'], requests.codes.ok) self.assertIn('Operation Successful', response['output']['configuration-response-common']['response-message']) + time.sleep(2) # Test the interfaces on SPDR-A1 def test_12_check_interface_10GE_CLIENT(self): diff --git a/tests/transportpce_tests/2.2.1/test11_otn_end2end.py b/tests/transportpce_tests/2.2.1/test11_otn_end2end.py index b6181acf6..4da4d80b0 100644 --- a/tests/transportpce_tests/2.2.1/test11_otn_end2end.py +++ b/tests/transportpce_tests/2.2.1/test11_otn_end2end.py @@ -151,7 +151,7 @@ class TransportPCEtesting(unittest.TestCase): print("all processes killed") def setUp(self): - time.sleep(5) + time.sleep(2) def test_01_connect_spdrA(self): response = test_utils.mount_device("SPDR-SA1", ('spdra', self.NODE_VERSION)) diff --git a/tests/transportpce_tests/7.1/test02_otn_renderer.py b/tests/transportpce_tests/7.1/test02_otn_renderer.py index a0a4c1ed6..bcf644f8f 100644 --- a/tests/transportpce_tests/7.1/test02_otn_renderer.py +++ b/tests/transportpce_tests/7.1/test02_otn_renderer.py @@ -54,7 +54,7 @@ class TransportPCE400GPortMappingTesting(unittest.TestCase): def setUp(self): # pylint: disable=consider-using-f-string print("execution of {}".format(self.id().split(".")[-1])) - time.sleep(10) + time.sleep(2) def test_01_xpdr_device_connection(self): response = test_utils.mount_device("XPDR-A2", diff --git a/tests/transportpce_tests/7.1/test03_renderer_or_modes.py b/tests/transportpce_tests/7.1/test03_renderer_or_modes.py index b8173c2aa..259245785 100644 --- a/tests/transportpce_tests/7.1/test03_renderer_or_modes.py +++ b/tests/transportpce_tests/7.1/test03_renderer_or_modes.py @@ -58,7 +58,7 @@ class TransportPCE400GPortMappingTesting(unittest.TestCase): def setUp(self): # pylint: disable=consider-using-f-string print("execution of {}".format(self.id().split(".")[-1])) - time.sleep(10) + time.sleep(2) def test_01_xpdr_device_connection(self): response = test_utils.mount_device("XPDR-A2", diff --git a/tests/transportpce_tests/tapi/test02_full_topology.py b/tests/transportpce_tests/tapi/test02_full_topology.py index 10ec7bf07..c8d79a78c 100644 --- a/tests/transportpce_tests/tapi/test02_full_topology.py +++ b/tests/transportpce_tests/tapi/test02_full_topology.py @@ -132,7 +132,7 @@ class TransportPCEtesting(unittest.TestCase): print("all processes killed") def setUp(self): - time.sleep(5) + time.sleep(2) def test_01_connect_spdrA(self): print("Connecting SPDRA") -- 2.36.6