Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase Windows timeout 15 -> 25 ms #940

Merged
merged 1 commit into from
Sep 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rcl/test/rcl/test_wait.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#ifndef _WIN32
#define TOLERANCE RCL_MS_TO_NS(6)
#else
#define TOLERANCE RCL_MS_TO_NS(15)
#define TOLERANCE RCL_MS_TO_NS(25)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly, I wonder if we should just get rid of this TOLERANCE and just switch any place that uses it to EXPECT_GT. Since we aren't dealing with real-time OSs or threads here, there is no guarantee that any of these tests come back in a reasonable amount of time; the OS could choose not to schedule this process for long periods of time.

We'll lose checking if the timeout is similar to what the user asked for, but I think that is relatively low risk.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fair, and I agree that time-sensitive tests are inherently flaky for the OSes we support, but I'll point out that validating that timeout is the sole purpose of several of these tests. We may as well drop them if we get rid of this TOLERANCE.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't feel super strongly about it. If updating the tolerance to 25ms here makes the tests less flaky, that's at least a step in the right direction.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the sound of making a small improvement for the moment. I don't feel like I have the bandwidth to look into which tests should be dropped at the moment.

#endif

class CLASSNAME (WaitSetTestFixture, RMW_IMPLEMENTATION) : public ::testing::Test
Expand Down