Skip to content

Commit

Permalink
initialize the global context to avoid runtime_error upon destruction
Browse files Browse the repository at this point in the history
  • Loading branch information
saikishor committed Nov 7, 2023
1 parent d90d85a commit e1a8720
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/realtime_clock_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ using realtime_tools::RealtimeClock;

TEST(RealtimeClock, get_system_time)
{
// initialize the global context
rclcpp::init(0, nullptr);
const int ATTEMPTS = 10;
const std::chrono::milliseconds DELAY(1);

Expand Down

0 comments on commit e1a8720

Please sign in to comment.