-
Notifications
You must be signed in to change notification settings - Fork 251
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
Wait for metadata to be written to disk #283
Conversation
d4a99b7
to
d873346
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. Consider making the assert statement more verbose
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.
@piraka9011 this looks fine, can you rebase and add DCO signoff so it passes checks?
8a81685
to
0a720fc
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, one nit
@@ -87,6 +87,24 @@ class RecordFixture : public TemporaryDirectoryFixture | |||
return root_bag_path_ / (get_bag_file_name(split_index) + ".db3"); | |||
} | |||
|
|||
void wait_for_metadata(int timeout_in_sec = 5) |
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.
It seems that timeout_in_sec
is never used, so we don't need this parameter, we can just set 5
as a constant.
https://martinfowler.com/bliki/Yagni.html
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.
Would it make sense to define it as a constant somewhere or just use 5
directly?
Signed-off-by: Anas Abou Allaban <allabana@amazon.com>
Signed-off-by: Anas Abou Allaban <allabana@amazon.com>
Signed-off-by: Anas Abou Allaban <allabana@amazon.com>
Signed-off-by: Anas Abou Allaban <allabana@amazon.com> Co-Authored-By: Zachary Michaels <zmichaels11@users.noreply.github.com>
Signed-off-by: Anas Abou Allaban <aabouallaban@pm.me>
Signed-off-by: Anas Abou Allaban <aabouallaban@pm.me>
Signed-off-by: Anas Abou Allaban <allabana@amazon.com>
c82266c
to
15145b7
Compare
@ros2/aws-oncall - please run this CI job |
Adds a method to the rosbag2 record E2E test fixture to wait until the metadata has been written to disk.
This resolves test flakiness on systems that are slow to flush all file system data to disk.
Signed-off-by: Anas Abou Allaban allabana@amazon.com