-
Notifications
You must be signed in to change notification settings - Fork 73
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
Debug/concurrent container test #139
base: develop
Are you sure you want to change the base?
Debug/concurrent container test #139
Conversation
@pschillinger have you observed something similar? some more information on this - for better understanding
|
Also, notice that the test failed for this specific reason:
This PR only makes that assertion less strict, but the above would still be out of spec. |
My first assessment would be the following: The test runs a concurrency container with two states both with 10Hz rate. In the first container execute, both states are executed and initialize their rate to execute again after 0.1s. The container then sleeps for the lowest sleep time of the states and in the second container execute, both states should execute again because they have the same rate. Now where this goes wrong could be that during the first container execute, there is a brief delay between the two state executes, e.g., due to an external process interrupt exactly at that moment, so when the second container execute starts, the second state still has like here 0.000545359 seconds on its sleep timer. This would not be notable in practice because the container schedules its next execute for the second state after this very short delay, but in this test case where the executes are called explicitly, it makes a difference. |
Aha! Is there anything I can help with further to find the cause and maybe propose a fix? |
We've noticed that sometimes the test for the
ConcurrencyContainer
failed, because the calculated sleep_duration was not accurate enough to satisfy the test but certainly looks correct.I think the issue is some rounding or floating point issue, but not sure.
This PR specifies a maximum deviation
delta
rather than the amount of decimal places.