Skip to content
Snippets Groups Projects
Commit 4762b8dc authored by Stefano Borini's avatar Stefano Borini
Browse files

Added test for broken MCO communicator

parent a5501988
No related branches found
No related tags found
1 merge request!138More robust logging for BDSS
...@@ -288,3 +288,23 @@ class TestCoreEvaluationDriver(unittest.TestCase): ...@@ -288,3 +288,23 @@ class TestCoreEvaluationDriver(unittest.TestCase):
kpi_results = execute_workflow(wf, data_values) kpi_results = execute_workflow(wf, data_values)
self.assertEqual(len(kpi_results), 1) self.assertEqual(len(kpi_results), 1)
self.assertEqual(kpi_results[0].value, 8750) self.assertEqual(kpi_results[0].value, 8750)
def test_mco_communicator_broken(self):
self.registry.mco_factories[0].raises_on_create_communicator = True
driver = CoreEvaluationDriver(
application=self.mock_application,
)
with testfixtures.LogCapture() as capture:
with self.assertRaises(Exception):
driver.application_started()
capture.check(
('force_bdss.core_evaluation_driver', 'INFO',
'Creating communicator'),
("force_bdss.core_evaluation_driver",
"ERROR",
'Unable to create communicator from MCO factory '
"'force.bdss.enthought.plugin.test.v0"
".factory.probe_mco' in plugin "
"'force.bdss.enthought.plugin.test.v0'. "
"This may indicate a programming error in the plugin"))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment