@@ -253,7 +253,7 @@ TEST_F(RecordFixture, record_end_to_end_with_splitting_bagsize_split_is_at_least
253
253
#ifdef _WIN32
254
254
{
255
255
rosbag2_storage::BagMetadata metadata;
256
- metadata.version = 2 ;
256
+ metadata.version = 4 ;
257
257
metadata.storage_identifier = " sqlite3" ;
258
258
259
259
// Loop until expected_splits in case it split or the bagfile doesn't exist.
@@ -282,7 +282,7 @@ TEST_F(RecordFixture, record_end_to_end_with_splitting_bagsize_split_is_at_least
282
282
283
283
// Don't include the last bagfile since it won't be full
284
284
for (int i = 0 ; i < actual_splits - 1 ; ++i) {
285
- const auto bagfile_path = rcpputils::fs::path{metadata.relative_file_paths [i]};
285
+ const auto bagfile_path = root_bag_path_ / rcpputils::fs::path{metadata.relative_file_paths [i]};
286
286
ASSERT_TRUE (bagfile_path.exists ()) <<
287
287
" Expected bag file: \" " << bagfile_path.string () << " \" to exist." ;
288
288
@@ -327,7 +327,7 @@ TEST_F(RecordFixture, record_end_to_end_with_splitting_max_size_not_reached) {
327
327
#ifdef _WIN32
328
328
{
329
329
rosbag2_storage::BagMetadata metadata;
330
- metadata.version = 2 ;
330
+ metadata.version = 4 ;
331
331
metadata.storage_identifier = " sqlite3" ;
332
332
metadata.relative_file_paths = {get_bag_file_path (0 ).string ()};
333
333
metadata_io.write_metadata (root_bag_path_.string (), metadata);
@@ -339,7 +339,7 @@ TEST_F(RecordFixture, record_end_to_end_with_splitting_max_size_not_reached) {
339
339
340
340
// Check that there's only 1 bagfile and that it exists.
341
341
EXPECT_EQ (1u , metadata.relative_file_paths .size ());
342
- EXPECT_TRUE (rcpputils::fs::exists ( metadata.relative_file_paths [0 ]));
342
+ EXPECT_TRUE ((root_bag_path_ / metadata.relative_file_paths [0 ]). exists ( ));
343
343
344
344
// Check that the next bagfile does not exist.
345
345
const auto next_bag_file = get_bag_file_path (1 );
@@ -384,7 +384,7 @@ TEST_F(RecordFixture, record_end_to_end_with_splitting_splits_bagfile) {
384
384
#ifdef _WIN32
385
385
{
386
386
rosbag2_storage::BagMetadata metadata;
387
- metadata.version = 2 ;
387
+ metadata.version = 4 ;
388
388
metadata.storage_identifier = " sqlite3" ;
389
389
390
390
for (int i = 0 ; i < expected_splits; ++i) {
@@ -406,7 +406,8 @@ TEST_F(RecordFixture, record_end_to_end_with_splitting_splits_bagfile) {
406
406
wait_for_metadata ();
407
407
const auto metadata = metadata_io.read_metadata (root_bag_path_.string ());
408
408
409
- for (const auto & path : metadata.relative_file_paths ) {
409
+ for (const auto & rel_path : metadata.relative_file_paths ) {
410
+ auto path = root_bag_path_ / rcpputils::fs::path (rel_path);
410
411
EXPECT_TRUE (rcpputils::fs::exists (path));
411
412
}
412
413
}
0 commit comments