Skip to content

Commit 896d8b8

Browse files
committed
Address race condition in rosbag2_py.test_record_cancel
- Add `record_thread.join()` before trying to parse metadata. Signed-off-by: Michael Orlov <[email protected]>
1 parent c0b75eb commit 896d8b8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

rosbag2_py/test/test_transport.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ def test_record_cancel(tmp_path, storage_id):
8080
metadata_io = rosbag2_py.MetadataIo()
8181
assert wait_for(lambda: metadata_io.metadata_file_exists(bag_path),
8282
timeout=rclpy.duration.Duration(seconds=3))
83+
record_thread.join()
8384

8485
metadata = metadata_io.read_metadata(bag_path)
8586
assert(len(metadata.relative_file_paths))

0 commit comments

Comments
 (0)