diff --git a/localization/landmark_based_localizer/ar_tag_based_localizer/test/test.cpp b/localization/landmark_based_localizer/ar_tag_based_localizer/test/test.cpp index 5d05dd7e3755a..d62c2b38b6cd1 100644 --- a/localization/landmark_based_localizer/ar_tag_based_localizer/test/test.cpp +++ b/localization/landmark_based_localizer/ar_tag_based_localizer/test/test.cpp @@ -56,7 +56,9 @@ class TestArTagBasedLocalizer : public ::testing::Test TEST_F(TestArTagBasedLocalizer, test_setup) // NOLINT { // Check if the constructor finishes successfully - EXPECT_TRUE(true); + // For some unknown reason, the test sometimes fails to terminate normally and results in failure + // unless a 1-second wait is implemented. + std::this_thread::sleep_for(std::chrono::seconds(1)); } int main(int argc, char ** argv)