Skip to content

Commit

Permalink
Adjust for API changes in RTPS reader APIs (#140)
Browse files Browse the repository at this point in the history
* Refs #21120: Adjust for API changes

Signed-off-by: eduponz <[email protected]>

* Refs #21120: Correct typo

Signed-off-by: eduponz <[email protected]>

* Refs #21120. Force fastdds log consumer to `STDOUT`.

Signed-off-by: Miguel Company <[email protected]>

---------

Signed-off-by: eduponz <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
Co-authored-by: Miguel Company <[email protected]>
  • Loading branch information
EduPonz and MiguelCompany authored Jun 12, 2024
1 parent cce555d commit 7b27cf7
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 35 deletions.
25 changes: 8 additions & 17 deletions .github/workflows/test.meta
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
{
"names":
{
"fastdds":
{
"cmake-args": [
"-DSECURITY=ON"
]
},
"fastdds_python":
{
"cmake-args": [
"-DBUILD_TESTING=ON"
]
}
}
}
names:
fastdds:
cmake-args:
- "-DSECURITY=ON"
- "-DLOG_CONSUMER_DEFAULT=STDOUT"
fastdds_python:
cmake-args:
- "-DBUILD_TESTING=ON"
4 changes: 2 additions & 2 deletions fastdds_python/test/api/test_domainparticipant.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def test_create_publisher_with_profile(participant):

# Failure
publisher = participant.create_publisher_with_profile(
'no_exits_profile')
'no_exists_profile')
assert(publisher is None)

# Overload 1
Expand Down Expand Up @@ -436,7 +436,7 @@ def test_create_subscriber_with_profile(participant):

# Failure
subscriber = participant.create_subscriber_with_profile(
'no_exits_profile')
'no_exists_profile')
assert(subscriber is None)

# Overload 1
Expand Down
4 changes: 2 additions & 2 deletions fastdds_python/test/api/test_domainparticipantfactory.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ def test_create_participant_with_profile():

# Failure
participant = factory.create_participant_with_profile(
'no_exits_profile')
'no_exists_profile')
assert(participant is None)
participant = factory.create_participant_with_profile(
0, 'no_exits_profile')
0, 'no_exists_profile')
assert(participant is None)

# Overload 1
Expand Down
2 changes: 1 addition & 1 deletion fastdds_python/test/api/test_publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def test_create_datawriter_with_profile(topic, publisher):

# Failure
datawriter = publisher.create_datawriter_with_profile(
topic, 'no_exits_profile')
topic, 'no_exists_profile')
assert(datawriter is None)

# Overload 1
Expand Down
24 changes: 12 additions & 12 deletions fastdds_python/test/api/test_qos.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,25 +153,25 @@ def test_datareader_qos():
datareader_qos.durability_service().service_cleanup_delay.nanosec)

# .reliable_reader_qos
datareader_qos.reliable_reader_qos().times.initialAcknackDelay.seconds = 34
datareader_qos.reliable_reader_qos().times.initialAcknackDelay.nanosec = 32
datareader_qos.reliable_reader_qos().times.heartbeatResponseDelay. \
datareader_qos.reliable_reader_qos().times.initial_acknack_delay.seconds = 34
datareader_qos.reliable_reader_qos().times.initial_acknack_delay.nanosec = 32
datareader_qos.reliable_reader_qos().times.heartbeat_response_delay. \
seconds = 432
datareader_qos.reliable_reader_qos().times.heartbeatResponseDelay. \
datareader_qos.reliable_reader_qos().times.heartbeat_response_delay. \
nanosec = 43
datareader_qos.reliable_reader_qos().disable_positive_ACKs.enabled = True
datareader_qos.reliable_reader_qos().disable_positive_ACKs.duration. \
seconds = 13
datareader_qos.reliable_reader_qos().disable_positive_ACKs.duration. \
nanosec = 320
assert(34 == datareader_qos.reliable_reader_qos().times.
initialAcknackDelay.seconds)
initial_acknack_delay.seconds)
assert(32 == datareader_qos.reliable_reader_qos().times.
initialAcknackDelay.nanosec)
initial_acknack_delay.nanosec)
assert(432 == datareader_qos.reliable_reader_qos().times.
heartbeatResponseDelay.seconds)
heartbeat_response_delay.seconds)
assert(43 == datareader_qos.reliable_reader_qos().times.
heartbeatResponseDelay.nanosec)
heartbeat_response_delay.nanosec)
assert(datareader_qos.reliable_reader_qos().
disable_positive_ACKs.enabled)
assert(13 == datareader_qos.reliable_reader_qos().
Expand Down Expand Up @@ -389,13 +389,13 @@ def test_datareader_qos():

# .reliable_reader_qos
assert(34 == default_datareader_qos.reliable_reader_qos().times.
initialAcknackDelay.seconds)
initial_acknack_delay.seconds)
assert(32 == default_datareader_qos.reliable_reader_qos().times.
initialAcknackDelay.nanosec)
initial_acknack_delay.nanosec)
assert(432 == default_datareader_qos.reliable_reader_qos().times.
heartbeatResponseDelay.seconds)
heartbeat_response_delay.seconds)
assert(43 == default_datareader_qos.reliable_reader_qos().times.
heartbeatResponseDelay.nanosec)
heartbeat_response_delay.nanosec)
assert(default_datareader_qos.reliable_reader_qos().
disable_positive_ACKs.enabled)
assert(13 == default_datareader_qos.reliable_reader_qos().
Expand Down
2 changes: 1 addition & 1 deletion fastdds_python/test/api/test_subscriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def test_create_datareader_with_profile(topic, subscriber):

# Failure
datareader = subscriber.create_datareader_with_profile(
topic, 'no_exits_profile')
topic, 'no_exists_profile')
assert(datareader is None)

# Overload 1
Expand Down

0 comments on commit 7b27cf7

Please sign in to comment.