Commit 9054ef4d authored by payno's avatar payno
Browse files

[CI] fix some unit test since channel is passed

parent 5333a99a
...@@ -49,9 +49,9 @@ class TestPythonActor(unittest.TestCase): ...@@ -49,9 +49,9 @@ class TestPythonActor(unittest.TestCase):
'name': 'Ragnar' 'name': 'Ragnar'
} }
actor.connect(stopActor) actor.connect(stopActor)
actor.trigger(inData) actor.trigger((None, inData))
stopActor.join(timeout=10) stopActor.join(timeout=10)
out_data = stopActor.out_data out_channel, out_data = stopActor.out_data
self.assertIsNotNone(out_data) self.assertIsNotNone(out_data)
self.assertEqual(out_data['reply'], 'Hello Ragnar!') self.assertEqual(out_data['reply'], 'Hello Ragnar!')
...@@ -67,11 +67,12 @@ class TestPythonActor(unittest.TestCase): ...@@ -67,11 +67,12 @@ class TestPythonActor(unittest.TestCase):
actor.connect(stopActor) actor.connect(stopActor)
actor.connectOnError(errorHandler) actor.connectOnError(errorHandler)
errorHandler.connect(stopActor) errorHandler.connect(stopActor)
actor.trigger(inData) actor.trigger((None, inData))
stopActor.join(timeout=5) stopActor.join(timeout=5)
out_data = stopActor.out_data out_channel, out_data = stopActor.out_data
self.assertIsNotNone(out_data) self.assertIsNotNone(out_data)
self.assertTrue('WorkflowException' in out_data) self.assertTrue('WorkflowException' in out_data)
self.assertEqual(out_channel, None)
def test_ForkAndJoinActors(self): def test_ForkAndJoinActors(self):
start = StartActor() start = StartActor()
...@@ -91,9 +92,9 @@ class TestPythonActor(unittest.TestCase): ...@@ -91,9 +92,9 @@ class TestPythonActor(unittest.TestCase):
joinActor.connect(stop) joinActor.connect(stop)
# Run # Run
inData = {'a': 1} inData = {'a': 1}
start.trigger(inData) start.trigger((None, inData))
stop.join(timeout=5) stop.join(timeout=5)
out_data = stop.out_data out_channel, out_data = stop.out_data
self.assertIsNotNone(out_data) self.assertIsNotNone(out_data)
logger.info(out_data) logger.info(out_data)
......
...@@ -68,7 +68,7 @@ class TestScheme(unittest.TestCase): ...@@ -68,7 +68,7 @@ class TestScheme(unittest.TestCase):
def testProcessing(self): def testProcessing(self):
processable_workflow = ProcessableWorkflow(scheme=self.scheme) processable_workflow = ProcessableWorkflow(scheme=self.scheme)
out_ = exec_(scheme=processable_workflow, input_={'data': 0,}) channel_out, out_ = exec_(scheme=processable_workflow, input_=(None, {'data': 0,}))
self.assertEqual(out_['data'], 7) self.assertEqual(out_['data'], 7)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment