Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[21329] Update DataWriter::write return value as ReturnCode_t #158

Merged
merged 1 commit into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions fastdds_python/test/api/test_datareader.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ def test_get_first_untaken(transient_datareader_qos, datareader,

sample = pytest.dds_type.CompleteTestType()
sample.int16_field(255)
assert(datawriter.write(sample))
assert(fastdds.RETCODE_OK == datawriter.write(sample))

assert(datareader.wait_for_unread_message(
fastdds.Duration_t(5, 0)))
Expand Down Expand Up @@ -968,7 +968,7 @@ def test_get_unread_count(transient_datareader_qos, datareader,

sample = pytest.dds_type.CompleteTestType()
sample.int16_field(255)
assert(datawriter.write(sample))
assert(fastdds.RETCODE_OK == datawriter.write(sample))

assert(datareader.wait_for_unread_message(
fastdds.Duration_t(5, 0)))
Expand All @@ -983,7 +983,7 @@ def test_is_sample_valid(transient_datareader_qos, datareader,
"""
sample = pytest.dds_type.CompleteTestType()
sample.int16_field(255)
assert(datawriter.write(sample))
assert(fastdds.RETCODE_OK == datawriter.write(sample))

assert(datareader.wait_for_unread_message(
fastdds.Duration_t(5, 0)))
Expand Down Expand Up @@ -1043,7 +1043,7 @@ def test_read(transient_datareader_qos, datareader,

sample = pytest.dds_type.CompleteTestType()
fill_keyed_complete_test_type(sample, cdr_version)
assert(datawriter.write(sample))
assert(fastdds.RETCODE_OK == datawriter.write(sample))

assert(datareader.wait_for_unread_message(
fastdds.Duration_t(5, 0)))
Expand Down Expand Up @@ -1123,7 +1123,7 @@ def test_read_next_instance(transient_datareader_qos, test_keyed_type,

sample = pytest.dds_type.KeyedCompleteTestType()
fill_keyed_complete_test_type(sample, cdr_version)
assert(datawriter.write(sample))
assert(fastdds.RETCODE_OK == datawriter.write(sample))

assert(datareader.wait_for_unread_message(
fastdds.Duration_t(5, 0)))
Expand Down Expand Up @@ -1157,7 +1157,7 @@ def test_read_next_sample(transient_datareader_qos, datareader,

sample = pytest.dds_type.CompleteTestType()
fill_keyed_complete_test_type(sample, cdr_version)
assert(datawriter.write(sample))
assert(fastdds.RETCODE_OK == datawriter.write(sample))

assert(datareader.wait_for_unread_message(
fastdds.Duration_t(5, 0)))
Expand Down Expand Up @@ -1189,7 +1189,7 @@ def test_take(transient_datareader_qos, datareader,

sample = pytest.dds_type.CompleteTestType()
fill_keyed_complete_test_type(sample, cdr_version)
assert(datawriter.write(sample))
assert(fastdds.RETCODE_OK == datawriter.write(sample))

assert(datareader.wait_for_unread_message(
fastdds.Duration_t(5, 0)))
Expand Down Expand Up @@ -1269,7 +1269,7 @@ def test_take_next_instance(transient_datareader_qos, test_keyed_type,

sample = pytest.dds_type.KeyedCompleteTestType()
fill_keyed_complete_test_type(sample, cdr_version)
assert(datawriter.write(sample))
assert(fastdds.RETCODE_OK == datawriter.write(sample))

assert(datareader.wait_for_unread_message(
fastdds.Duration_t(5, 0)))
Expand Down Expand Up @@ -1303,7 +1303,7 @@ def test_take_next_sample(transient_datareader_qos, datareader,

sample = pytest.dds_type.CompleteTestType()
fill_keyed_complete_test_type(sample, cdr_version)
assert(datawriter.write(sample))
assert(fastdds.RETCODE_OK == datawriter.write(sample))

assert(datareader.wait_for_unread_message(
fastdds.Duration_t(5, 0)))
Expand Down
8 changes: 4 additions & 4 deletions fastdds_python/test/api/test_datawriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def test_clear_history(keep_all_datawriter_qos, datawriter):
"""
sample = pytest.dds_type.CompleteTestType()
sample.int16_field(4)
assert(datawriter.write(sample))
assert(fastdds.RETCODE_OK == datawriter.write(sample))
assert([fastdds.RETCODE_OK, 1] ==
datawriter.clear_history())

Expand Down Expand Up @@ -497,7 +497,7 @@ def test_wait_for_acknowledgments(test_keyed_type, datawriter):
# Overload 1
sample = pytest.dds_type.KeyedCompleteTestType()
sample.id(3)
assert(datawriter.write(sample))
assert(fastdds.RETCODE_OK == datawriter.write(sample))
assert(fastdds.RETCODE_OK ==
datawriter.wait_for_acknowledgments(fastdds.Duration_t(1, 0)))

Expand All @@ -517,7 +517,7 @@ def test_write(test_keyed_type, datawriter):
"""
# Overload 1
sample = pytest.dds_type.KeyedCompleteTestType()
assert(datawriter.write(sample))
assert(fastdds.RETCODE_OK == datawriter.write(sample))

# Overload 2
sample = pytest.dds_type.KeyedCompleteTestType()
Expand All @@ -530,7 +530,7 @@ def test_write(test_keyed_type, datawriter):
sequence_number.low = 1
params.related_sample_identity().writer_guid(guid)
params.related_sample_identity().sequence_number(sequence_number)
assert(datawriter.write(sample, params))
assert(fastdds.RETCODE_OK == datawriter.write(sample, params))

# Overload 3
sample = pytest.dds_type.KeyedCompleteTestType()
Expand Down