Skip to content

Commit 2b6930e

Browse files
authored
Update deprecated qos policy value names (#571)
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
1 parent 56db2ba commit 2b6930e

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

ros2topic/test/qos_subscription.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,31 +55,31 @@ def main(args=None):
5555
lambda msg: counter.onMsg('transient', msg),
5656
QoSProfile(
5757
depth=10,
58-
durability=QoSDurabilityPolicy.RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL))
58+
durability=QoSDurabilityPolicy.TRANSIENT_LOCAL))
5959

6060
sub_volatile = node.create_subscription(
6161
String,
6262
'topic',
6363
lambda msg: counter.onMsg('volatile', msg),
6464
QoSProfile(
6565
depth=10,
66-
durability=QoSDurabilityPolicy.RMW_QOS_POLICY_DURABILITY_VOLATILE))
66+
durability=QoSDurabilityPolicy.VOLATILE))
6767

6868
sub_reliable = node.create_subscription(
6969
String,
7070
'topic',
7171
lambda msg: counter.onMsg('reliable', msg),
7272
QoSProfile(
7373
depth=10,
74-
reliability=QoSReliabilityPolicy.RMW_QOS_POLICY_RELIABILITY_RELIABLE))
74+
reliability=QoSReliabilityPolicy.RELIABLE))
7575

7676
sub_best_effort = node.create_subscription(
7777
String,
7878
'topic',
7979
lambda msg: counter.onMsg('best_effort', msg),
8080
QoSProfile(
8181
depth=10,
82-
reliability=QoSReliabilityPolicy.RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT))
82+
reliability=QoSReliabilityPolicy.BEST_EFFORT))
8383

8484
# Asserts to suppress unused variable warnings.
8585
assert sub_default

ros2topic/test/test_cli.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,11 +295,11 @@ def test_topic_endpoint_info_verbose(self):
295295
re.compile(r'Endpoint type: (INVALID|PUBLISHER|SUBSCRIPTION)'),
296296
re.compile(r'GID: [\w\.]+'),
297297
'QoS profile:',
298-
re.compile(r' Reliability: RMW_QOS_POLICY_RELIABILITY_\w+'),
299-
re.compile(r' Durability: RMW_QOS_POLICY_DURABILITY_\w+'),
298+
re.compile(r' Reliability: (RELIABLE|BEST_EFFORT|SYSTEM_DEFAULT|UNKNOWN)'),
299+
re.compile(r' Durability: (VOLATILE|TRANSIENT_LOCAL|SYSTEM_DEFAULT|UNKNOWN)'),
300300
re.compile(r' Lifespan: \d+ nanoseconds'),
301301
re.compile(r' Deadline: \d+ nanoseconds'),
302-
re.compile(r' Liveliness: RMW_QOS_POLICY_LIVELINESS_\w+'),
302+
re.compile(r' Liveliness: (AUTOMATIC|MANUAL_BY_TOPIC|SYSTEM_DEFAULT|UNKNOWN)'),
303303
re.compile(r' Liveliness lease duration: \d+ nanoseconds'),
304304
'',
305305
'Subscription count: 0',

0 commit comments

Comments
 (0)