Skip to content

Commit

Permalink
Rename variables
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
  • Loading branch information
jacobperron committed May 1, 2019
1 parent 3392611 commit e7109eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rclpy/test/test_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,18 @@ def raw_subscription_callback(self, msg):
def test_create_raw_subscription(self):
executor = SingleThreadedExecutor(context=self.context)
executor.add_node(self.node)
primitives_pub = self.node.create_publisher(BasicTypes, 'raw_subscription_test')
basic_types_pub = self.node.create_publisher(BasicTypes, 'raw_subscription_test')
self.raw_subscription_msg = None # None=No result yet
self.node.create_subscription(
BasicTypes,
'raw_subscription_test',
self.raw_subscription_callback,
raw=True
)
primitives_msg = BasicTypes()
basic_types_msg = BasicTypes()
cycle_count = 0
while cycle_count < 5 and self.raw_subscription_msg is None:
primitives_pub.publish(primitives_msg)
basic_types_pub.publish(basic_types_msg)
cycle_count += 1
executor.spin_once(timeout_sec=1)
self.assertIsNotNone(self.raw_subscription_msg, 'raw subscribe timed out')
Expand Down

0 comments on commit e7109eb

Please sign in to comment.