Skip to content

Commit

Permalink
Revert "Fix flaky waits on Windows."
Browse files Browse the repository at this point in the history
This reverts commit 05bfb21.

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
  • Loading branch information
hidmic committed Jun 12, 2020
1 parent 05bfb21 commit 7a98918
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rcl/test/rcl/test_timer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ TEST_F(TestTimerFixture, test_two_timers_ready_before_timeout) {
rcl_timer_t timer2 = rcl_get_zero_initialized_timer();

ret = rcl_timer_init(
&timer, &clock, this->context_ptr, RCL_MS_TO_NS(100), nullptr, rcl_get_default_allocator());
&timer, &clock, this->context_ptr, RCL_MS_TO_NS(50), nullptr, rcl_get_default_allocator());
ASSERT_EQ(RCL_RET_OK, ret) << rcl_get_error_string().str;

ret = rcl_timer_init(
Expand All @@ -207,7 +207,7 @@ TEST_F(TestTimerFixture, test_two_timers_ready_before_timeout) {
ret = rcl_wait_set_fini(&wait_set);
EXPECT_EQ(RCL_RET_OK, ret) << rcl_get_error_string().str;
});
ret = rcl_wait(&wait_set, RCL_MS_TO_NS(200));
ret = rcl_wait(&wait_set, RCL_MS_TO_NS(100));
EXPECT_EQ(RCL_RET_OK, ret) << rcl_get_error_string().str;
uint8_t nonnull_timers = 0;
for (uint8_t i = 0; i < wait_set.size_of_timers; i++) {
Expand Down Expand Up @@ -288,7 +288,7 @@ TEST_F(TestTimerFixture, test_timer_overrun) {

rcl_timer_t timer = rcl_get_zero_initialized_timer();
ret = rcl_timer_init(
&timer, &clock, this->context_ptr, RCL_MS_TO_NS(200), nullptr, rcl_get_default_allocator());
&timer, &clock, this->context_ptr, RCL_MS_TO_NS(100), nullptr, rcl_get_default_allocator());
ASSERT_EQ(RCL_RET_OK, ret) << rcl_get_error_string().str;
OSRF_TESTING_TOOLS_CPP_SCOPE_EXIT(
{
Expand Down Expand Up @@ -326,7 +326,7 @@ TEST_F(TestTimerFixture, test_timer_overrun) {
rcl_reset_error();

// Ensure period is re-aligned.
ret = rcl_wait(&wait_set, RCL_MS_TO_NS(100));
ret = rcl_wait(&wait_set, RCL_MS_TO_NS(50));
EXPECT_EQ(RCL_RET_TIMEOUT, ret) << rcl_get_error_string().str;
rcl_reset_error();

Expand Down

0 comments on commit 7a98918

Please sign in to comment.