Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions rclpy/test/test_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,19 +365,19 @@ async def coroutine():
await thread_future

def future_thread():
threading.Event().wait(0.1) # Simulate some work
time.sleep(0.1) # Simulate some work
thread_future.set_result(None)

t = threading.Thread(target=future_thread)

coroutine_future = executor.create_task(coroutine)

start_time = time.monotonic()
start_time = time.perf_counter()

t.start()
executor.spin_until_future_complete(coroutine_future, timeout_sec=1.0)

end_time = time.monotonic()
end_time = time.perf_counter()

self.assertTrue(coroutine_future.done())

Expand Down