File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
rosbridge_library/test/capabilities Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 11#!/usr/bin/env python3
22from __future__ import annotations
33
4+ import contextlib
45import time
56import unittest
67from json import dumps , loads
@@ -271,7 +272,9 @@ def test_unadvertise_with_live_request(self) -> None:
271272 self .received_message = None
272273 start_time = time .monotonic ()
273274 while self .received_message is None :
274- rclpy .spin_once (self .node , timeout_sec = 0.1 )
275+ # TODO: Remove this suppress once this is merged: https://github.com/ros2/rclpy/pull/1582
276+ with contextlib .suppress (RuntimeError ):
277+ rclpy .spin_once (self .node , timeout_sec = 0.1 )
275278 if time .monotonic () - start_time > 1.0 :
276279 self .fail (
277280 "Timed out waiting for service_response after unadvertise (expected timeout response)."
You can’t perform that action at this time.
0 commit comments