-
Notifications
You must be signed in to change notification settings - Fork 251
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
Make test play services more reliable #1033
Conversation
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ivanpauno I am sorry but this is not what I would expected to see in our tests.
Our tests exists to make sure that there are no issues rather than try to hide any issues.
Sending request multiple times in loop until we will get response is not acceptable, at least in this case.
Because we have expectations in tests and workflow in particularly in play_next
the number or requests and corresponding responses shall match to each other.
I think that issue with discovery which you are trying to mitigate is not a root cause of the issue which we have with failing test_play_services
tests. Because according to the logs the failure never happened on first service request from the tests it rather happened on 3-4 request and more often on 100s and more with test_play_next scenario.
are you sure?
In all the CI links in #862, none of them seem to be failing there.
If it's a service discovery issue, the alternatives are doing this or waiting for some seconds after creating the services. If it's not a discovery issue and it's another thing, I have no idea what's going on. |
I am 100% sure that this is not a discovery issue. And I can prove it.
Test rosbag2/rosbag2_transport/test/rosbag2_transport/test_play_services.cpp Lines 106 to 108 in 164475b
was called from line : 378 rosbag2/rosbag2_transport/test/rosbag2_transport/test_play_services.cpp Lines 373 to 381 in 164475b
From log it is very clear that we successfully called rosbag2/rosbag2_transport/test/rosbag2_transport/test_play_services.cpp Lines 314 to 332 in 164475b
and failure never happened on FIRST ASSERT_TRUE(service_call_is_paused()); but rather on 3d or 4th call in the scope of the one unit test lines 326 and 330 respectively.
I also was able to reproduce this issue multiple times on my local machine and it never happens on first call for |
Here is a fresh example from today's CI failure https://github.com/ros2/rosbag2/runs/7197760772?check_suite_focus=true
According to the log, error happened at line 366 rosbag2/rosbag2_transport/test/rosbag2_transport/test_play_services.cpp Lines 350 to 368 in e1f4349
And this is second time calling get_response = service_call_get_rate(); in this test.The first one was successfully called from line 360. |
This doesn't seem to be the problem, so closing |
Maybe fixes #862.
This is a workaround, it doesn't fix the underlying issue.