Skip to content

Commit

Permalink
Update deprecated qos policy value names (#571)
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
  • Loading branch information
ivanpauno authored Oct 28, 2020
1 parent 56db2ba commit 2b6930e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions ros2topic/test/qos_subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,31 +55,31 @@ def main(args=None):
lambda msg: counter.onMsg('transient', msg),
QoSProfile(
depth=10,
durability=QoSDurabilityPolicy.RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL))
durability=QoSDurabilityPolicy.TRANSIENT_LOCAL))

sub_volatile = node.create_subscription(
String,
'topic',
lambda msg: counter.onMsg('volatile', msg),
QoSProfile(
depth=10,
durability=QoSDurabilityPolicy.RMW_QOS_POLICY_DURABILITY_VOLATILE))
durability=QoSDurabilityPolicy.VOLATILE))

sub_reliable = node.create_subscription(
String,
'topic',
lambda msg: counter.onMsg('reliable', msg),
QoSProfile(
depth=10,
reliability=QoSReliabilityPolicy.RMW_QOS_POLICY_RELIABILITY_RELIABLE))
reliability=QoSReliabilityPolicy.RELIABLE))

sub_best_effort = node.create_subscription(
String,
'topic',
lambda msg: counter.onMsg('best_effort', msg),
QoSProfile(
depth=10,
reliability=QoSReliabilityPolicy.RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT))
reliability=QoSReliabilityPolicy.BEST_EFFORT))

# Asserts to suppress unused variable warnings.
assert sub_default
Expand Down
6 changes: 3 additions & 3 deletions ros2topic/test/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,11 @@ def test_topic_endpoint_info_verbose(self):
re.compile(r'Endpoint type: (INVALID|PUBLISHER|SUBSCRIPTION)'),
re.compile(r'GID: [\w\.]+'),
'QoS profile:',
re.compile(r' Reliability: RMW_QOS_POLICY_RELIABILITY_\w+'),
re.compile(r' Durability: RMW_QOS_POLICY_DURABILITY_\w+'),
re.compile(r' Reliability: (RELIABLE|BEST_EFFORT|SYSTEM_DEFAULT|UNKNOWN)'),
re.compile(r' Durability: (VOLATILE|TRANSIENT_LOCAL|SYSTEM_DEFAULT|UNKNOWN)'),
re.compile(r' Lifespan: \d+ nanoseconds'),
re.compile(r' Deadline: \d+ nanoseconds'),
re.compile(r' Liveliness: RMW_QOS_POLICY_LIVELINESS_\w+'),
re.compile(r' Liveliness: (AUTOMATIC|MANUAL_BY_TOPIC|SYSTEM_DEFAULT|UNKNOWN)'),
re.compile(r' Liveliness lease duration: \d+ nanoseconds'),
'',
'Subscription count: 0',
Expand Down

0 comments on commit 2b6930e

Please sign in to comment.