tests: make test_sink_self_port_user_data actually test a sink
authorSimon Marchi <simon.marchi@efficios.com>
Tue, 7 Jan 2020 01:29:52 +0000 (20:29 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Tue, 7 Jan 2020 15:26:34 +0000 (15:26 +0000)
This test method is meant to test a sink, but currently tests a filter,
fix that.

Change-Id: Icca321f50a43b709b64f15c885c37c6e7106653d
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2735
Tested-by: jenkins <jenkins@lttng.org>
tests/bindings/python/bt2/test_port.py

index 53fdf9c79168a81d99cdcd4c65f602c9e62a7c01..c404d8fac8cd1cf9286383f7c717edce3fb1d648 100644 (file)
@@ -815,11 +815,7 @@ class PortTestCase(unittest.TestCase):
         )
 
     def test_sink_self_port_user_data(self):
-        class MyIter(bt2._UserMessageIterator):
-            def __next__(self):
-                raise bt2.Stop
-
-        class MySink(bt2._UserFilterComponent, message_iterator_class=MyIter):
+        class MySink(bt2._UserSinkComponent):
             def __init__(comp_self, config, params, obj):
                 nonlocal user_datas
 
@@ -828,6 +824,9 @@ class PortTestCase(unittest.TestCase):
                 p = comp_self._add_input_port('port2', set())
                 user_datas.append(p.user_data)
 
+            def _user_consume(self):
+                pass
+
         user_datas = []
 
         self._create_comp(MySink)
This page took 0.024629 seconds and 4 git commands to generate.