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 failing throws_on_invalid_pragma_in_config_file test on Windows (backport #1742) #1746

Merged
merged 1 commit into from
Jul 13, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Jul 13, 2024

RCA (Root Cause Analysis)

The failure was because the database file was not properly closed after throwing an exception from the SqliteWrapper constructor, and std::filesystem::remove_all(..) failed to delete a temporary folder in the test fixture destructor.

Fixes

  • I added a reset for the prepared SQL statement before throwing the exception.
  • Try to close the database in the constructor if we get an exception after opening the database since the destructor will not be called in this case.

This is an automatic backport of pull request #1742 done by [Mergify](https://mergify.com).

…1742)

- The failure was because database file was not properly closed after
throwing exception from the SqliteWrapper constructor and
std::filesystem::remove_all(..) failed to delete temporary folder in the
test fixture destructor.
- Added reset for prepared sql statement before throwing exception.
- Try to close database in constructor if we got exception after
opening it since destructor will not be called in this case.

Signed-off-by: Michael Orlov <[email protected]>
(cherry picked from commit 055935d)
@mergify mergify bot requested a review from a team as a code owner July 13, 2024 00:07
@mergify mergify bot requested review from MichaelOrlov and hidmic and removed request for a team July 13, 2024 00:07
@MichaelOrlov MichaelOrlov changed the title Fix for failing throws_on_invalid_pragma_in_config_file test on Windows (backport #1742) [jazzy] Fix for failing throws_on_invalid_pragma_in_config_file test on Windows (backport #1742) Jul 13, 2024
@MichaelOrlov
Copy link
Contributor

Pulls: #1746
Gist: https://gist.githubusercontent.com/MichaelOrlov/e48bfd953359e3151c33983d1790bd87/raw/c37d737f67abf3eee10cfbc8882f83ac1d7c6b39/ros2.repos
BUILD args: --packages-above-and-dependencies rosbag2_storage_sqlite3 rosbag2_tests
TEST args: --packages-above rosbag2_storage_sqlite3 rosbag2_tests
ROS Distro: jazzy
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/14231

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

@MichaelOrlov MichaelOrlov merged commit 793ef84 into jazzy Jul 13, 2024
14 checks passed
@MichaelOrlov MichaelOrlov deleted the mergify/bp/jazzy/pr-1742 branch July 13, 2024 03:23
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.

1 participant