-
Notifications
You must be signed in to change notification settings - Fork 258
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ros2:rolling' into patch-7
- Loading branch information
Showing
17 changed files
with
126 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
ros2bag/test/test_record_with_compression_thread_priority.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Copyright 2024 Open Source Robotics Foundation, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
from pathlib import Path | ||
import tempfile | ||
|
||
import unittest | ||
|
||
from launch import LaunchDescription | ||
from launch.actions import ExecuteProcess | ||
|
||
import launch_testing | ||
import launch_testing.actions | ||
|
||
import pytest | ||
|
||
|
||
@pytest.mark.launch_test | ||
def generate_test_description(): | ||
tmp_dir_name = tempfile.mkdtemp() | ||
output_path = Path(tmp_dir_name) / 'ros2bag_test_record_with_compression_thread_priority' | ||
record_process = ExecuteProcess( | ||
cmd=['ros2', 'bag', 'record', '-a', '--output', output_path.as_posix(), | ||
'--log-level', 'debug', '--compression-threads-priority', '1', | ||
'--compression-mode', 'file', '--compression-format', 'zstd'], | ||
name='ros2bag-cli', | ||
output='screen', | ||
) | ||
|
||
return LaunchDescription([ | ||
record_process, | ||
launch_testing.actions.ReadyToTest() | ||
]), locals() | ||
|
||
|
||
class TestRecordWithCompressionThreadPriority(unittest.TestCase): | ||
|
||
def test_priority_propagated_into_compression_thread( | ||
self, record_process, proc_output): | ||
proc_output.assertWaitFor( | ||
'Setting compression thread priority to 1', | ||
timeout=45, | ||
process=record_process | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
from typing import Any | ||
|
||
class LocalMessageDefinitionSource: | ||
def __init__(self) -> None: ... | ||
def get_full_text(self, *args, **kwargs) -> Any: ... | ||
def get_full_text(self, *args, **kwargs): ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.