-
Notifications
You must be signed in to change notification settings - Fork 28
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
Fix termination tests randomly timing out #68
Fix termination tests randomly timing out #68
Conversation
Unit tests are run in random order. Termination tests also verify the polling logic of the respective code, by atomically incrementing a counter in each call of the HTTP handler. The issues fixed with these changes are: 1. counter var not being reset after each termination test using polling 2. using the polling iterations loop in termination tests that were not using the HTTP handler that increments the counter 3. polling iterations loop not using sleep between iterations, which spikes CPU usage The first two issues led to the termination tests sometimes passing, depending on which termination test run first. If it was a test that incremented the polling counter, then all other test would be successful as well. If it was a test that didn't increment the polling counter, then the termination tests would be stuck in an endless loop, until the unit tests reached a timeout. Signed-off-by: Michail Resvanis <mresvani@redhat.com>
@mresvanis: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/cc @elmiko |
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.
thanks for the detailed explanation and the fix @mresvanis !
/approve
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: elmiko The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Unit tests are run in random order. Termination tests also verify the polling logic of the respective code, by atomically incrementing a counter in each call of the HTTP handler. The issues fixed with these changes are:
The first two issues led to the termination tests sometimes passing, depending on which termination test run first. If it was a test that incremented the polling counter, then all other tests would be successful as well. If it was a test that didn't increment the polling counter (because it wasn't using the respective HTTP handler), then the termination tests would be stuck in an endless loop, until the unit tests reached a timeout.