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

[jazzy] Fix for regression in open_succeeds_twice and minimal_writer_example tests (backport #1667) #1675

Merged
merged 1 commit into from
May 24, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented May 23, 2024

The error message from CI reference build:

/home/jenkins-agent/workspace/nightly_linux-aarch64_repeated/ws/src/ros2/rosbag2/rosbag2_compression/test/rosbag2_compression/test_sequential_compression_writer.cpp:242
Expected: writer_->open(storage_options, {serialization_format_, serialization_format_}) doesn't throw an exception.
  Actual: it throws std::runtime_error with description "Bag directory already exists (/tmp/path_not_empty), can't overwrite existing bag
  • This PR addresses the failure in the rosbag2_compression.SequentialCompressionWriterTest.open_succeeds_twice on a second run due to the leftovers in the temp folder.
    It also addresses the flakiness in TestRosbag2CPPAPI::minimal_writer_example due to using shared ptr to the serialized message twice in the writer.write(msg) call.
    Note. The "serialized_msg2" in the TestRosbag2CPPAPI::minimal_writer_example does not own the serialized data after the first call writer.write(serialized_msg2,..). i.e. need to use another message or another API in the test for the second call to the writer.write(msg).
    This is an automatic backport of pull request Fix for regression in open_succeeds_twice and minimal_writer_example tests #1667 done by Mergify.

…le` tests (#1667)

* Use test-specific temp subfolder to avoid leftovers from previous run

Signed-off-by: Michael Orlov <[email protected]>

* Address flakiness in TestRosbag2CPPAPI::minimal_writer_example

- The `serialized_msg2` is not owning the serialized data after the
first call writer.write(serialized_msg2,..). i.e. need to use another
message or another API in test for second call to writer.write(msg).

Signed-off-by: Michael Orlov <[email protected]>

---------

Signed-off-by: Michael Orlov <[email protected]>
(cherry picked from commit 8523995)
@mergify mergify bot requested a review from a team as a code owner May 23, 2024 22:13
@mergify mergify bot requested review from emersonknapp and hidmic and removed request for a team May 23, 2024 22:13
@MichaelOrlov MichaelOrlov changed the title Fix for regression in open_succeeds_twice and minimal_writer_example tests (backport #1667) [jazzy] Fix for regression in open_succeeds_twice and minimal_writer_example tests (backport #1667) May 23, 2024
@MichaelOrlov
Copy link
Contributor

Pulls: #1675
Gist: https://gist.githubusercontent.com/MichaelOrlov/f5f58e9194f6c7fdd59afffa892842a4/raw/749c904f34ed05e8bf55208dbb2cd7a94903fca7/ros2.repos
BUILD args: --packages-above-and-dependencies rosbag2_compression rosbag2_tests
TEST args: --packages-above rosbag2_compression rosbag2_tests
ROS Distro: jazzy
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/13956

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

@MichaelOrlov MichaelOrlov merged commit 3840224 into jazzy May 24, 2024
14 checks passed
@delete-merged-branch delete-merged-branch bot deleted the mergify/bp/jazzy/pr-1667 branch May 24, 2024 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants