-
Notifications
You must be signed in to change notification settings - Fork 245
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
Use ctrl-c to stop processes in Windows #278
Conversation
Signed-off-by: Anas Abou Allaban <allabana@amazon.com>
@ros2/aws-oncall - please run this CI job |
@zmichaels11 I ran this with rosbag2_test_common as well |
63044b1
to
b735ba9
Compare
Signed-off-by: Zachary Michaels <zmichaels11@gmail.com>
rosbag2_tests/test/rosbag2_tests/test_rosbag2_record_end_to_end.cpp
Outdated
Show resolved
Hide resolved
@@ -333,8 +333,15 @@ TEST_F(RecordFixture, record_end_to_end_with_splitting_splits_bagfile) { | |||
|
|||
const auto bag_path = rcpputils::fs::path(root_bag_path_) / bag_name.str(); | |||
|
|||
metadata.relative_file_paths.push_back(bag_path.string()); | |||
// There is not any guarantee that the bagfile split expected_split times | |||
// due to possible io sync delays. Instead, assert that the bagfile split |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch on the io sync stuff tho.
Signed-off-by: Zachary Michaels <zmichaels11@gmail.com>
Signed-off-by: Zachary Michaels <zmichaels11@gmail.com>
Signed-off-by: Zachary Michaels <zmichaels11@gmail.com>
Test still failed after clearing on Edit: |
EXPECT_THAT(exit_code, Eq(259)); | ||
|
||
ASSERT_THAT(exit_code, Eq(259)); | ||
GenerateConsoleCtrlEvent(CTRL_C_EVENT, handle.process_info.dwThreadId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: This actually didn't send SIGINT
on windows...
rosbag2_storage_plugins::SqliteWrapper | ||
db(database_path_, rosbag2_storage::storage_interfaces::IOFlag::READ_ONLY); | ||
return; | ||
if (rcpputils::fs::exists(rcpputils::fs::path{database_path_})) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line was the cause of flakiness;
SqliteWrapper
does not check if a file exists before opening the Db. The result is that the db is implicitly created if it does not exist.
b7a630b
to
07bbeda
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks for digging into this. make sure to note the file creation stuff in the merge commit
Signed-off-by: Zachary Michaels <zmichaels11@gmail.com>
07bbeda
to
99bac85
Compare
Send a
ctrl-c
event to a process withGenerateConsoleCtrlEvent
.Used in gracefully terminating processes in E2E tests.
Signed-off-by: Anas Abou Allaban allabana@amazon.com