Skip to content

Commit dc69a75

Browse files
committed
Fix flaky waits on Windows.
Signed-off-by: Michel Hidalgo <[email protected]>
1 parent 6bc2557 commit dc69a75

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

rcl/test/rcl/test_timer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ TEST_F(TestTimerFixture, test_two_timers_ready_before_timeout) {
183183
rcl_timer_t timer2 = rcl_get_zero_initialized_timer();
184184

185185
ret = rcl_timer_init(
186-
&timer, &clock, this->context_ptr, RCL_MS_TO_NS(50), nullptr, rcl_get_default_allocator());
186+
&timer, &clock, this->context_ptr, RCL_MS_TO_NS(10), nullptr, rcl_get_default_allocator());
187187
ASSERT_EQ(RCL_RET_OK, ret) << rcl_get_error_string().str;
188188

189189
ret = rcl_timer_init(
@@ -288,7 +288,7 @@ TEST_F(TestTimerFixture, test_timer_overrun) {
288288

289289
rcl_timer_t timer = rcl_get_zero_initialized_timer();
290290
ret = rcl_timer_init(
291-
&timer, &clock, this->context_ptr, RCL_MS_TO_NS(100), nullptr, rcl_get_default_allocator());
291+
&timer, &clock, this->context_ptr, RCL_MS_TO_NS(200), nullptr, rcl_get_default_allocator());
292292
ASSERT_EQ(RCL_RET_OK, ret) << rcl_get_error_string().str;
293293
OSRF_TESTING_TOOLS_CPP_SCOPE_EXIT(
294294
{
@@ -326,7 +326,7 @@ TEST_F(TestTimerFixture, test_timer_overrun) {
326326
rcl_reset_error();
327327

328328
// Ensure period is re-aligned.
329-
ret = rcl_wait(&wait_set, RCL_MS_TO_NS(50));
329+
ret = rcl_wait(&wait_set, RCL_MS_TO_NS(10));
330330
EXPECT_EQ(RCL_RET_TIMEOUT, ret) << rcl_get_error_string().str;
331331
rcl_reset_error();
332332

0 commit comments

Comments
 (0)