Skip to content

Commit

Permalink
Cut down the amount of time for test_logging_rosout. (#1098)
Browse files Browse the repository at this point in the history
In particular, when we are waiting for a failure, only
wait 500 milliseconds rather than 3 seconds.  In local testing,
this speeds the test up by about 15 seconds.

Signed-off-by: Chris Lalancette <[email protected]>
  • Loading branch information
clalancette authored Aug 28, 2023
1 parent 06d5745 commit 41b83c8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions rcl/test/rcl/test_logging_rosout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class TEST_FIXTURE_P_RMW (TestLoggingRosoutFixture)

class CLASSNAME (TestLogRosoutFixtureGeneral, RMW_IMPLEMENTATION) : public TestLoggingRosout {};

void
static void
check_if_rosout_subscription_gets_a_message(
const char * logger_name,
rcl_subscription_t * subscription,
Expand Down Expand Up @@ -229,7 +229,7 @@ TEST_P_RMW(TestLoggingRosoutFixture, test_logging_rosout) {
bool success = false;
check_if_rosout_subscription_gets_a_message(
rcl_node_get_logger_name(this->node_ptr), this->subscription_ptr,
this->context_ptr, 30, 100, success);
this->context_ptr, 5, 100, success);
ASSERT_EQ(success, GetParam().expected_success);
}

Expand Down Expand Up @@ -417,7 +417,7 @@ TEST_F(
bool expected = false;
check_if_rosout_subscription_gets_a_message(
full_sublogger_name.c_str(), this->subscription_ptr,
this->context_ptr, 30, 100, expected);
this->context_ptr, 5, 100, expected);
EXPECT_FALSE(expected);

EXPECT_EQ(RCL_RET_OK, rcl_logging_rosout_add_sublogger(logger_name, sublogger_name));
Expand All @@ -433,7 +433,7 @@ TEST_F(
// not to get the message after removing the sublogger
check_if_rosout_subscription_gets_a_message(
full_sublogger_name.c_str(), this->subscription_ptr,
this->context_ptr, 30, 100, expected);
this->context_ptr, 5, 100, expected);
EXPECT_FALSE(expected);
}

Expand Down Expand Up @@ -473,6 +473,6 @@ TEST_F(
// to get the message after removing the sublogger
check_if_rosout_subscription_gets_a_message(
full_sublogger_name.c_str(), this->subscription_ptr,
this->context_ptr, 30, 100, expected);
this->context_ptr, 5, 100, expected);
EXPECT_FALSE(expected);
}

0 comments on commit 41b83c8

Please sign in to comment.