-
Notifications
You must be signed in to change notification settings - Fork 182
Fix replication controller pods delete in tests #244
Conversation
Welcome @hedrox! |
/assign @yliaog |
dynamic/test_client.py
Outdated
self.assertEqual( | ||
[], | ||
pods.items, | ||
'ReplicationController pods were not deleted in the 60 sec interval') |
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.
'Background' would do the pod deletion in the background, it does not guarantee that the pods are deleted in specific amount of time. 60s is arbitrary, the pods may, or may not be deleted during that interval. hence the test is flaky.
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.
Is it ok if I remove the check that the pods have been deleted? This would leave the test as it was, but now it would have the propagation policy fix. Any other solution that I have involves waiting forever either for the pods in case of the 'Background' policy, or for the ReplicationController in case of the 'Foreground' policy.
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.
have you verified manually that the pods are deleted eventually with 'Background'?
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.
Yes, I have. If you want I could change it to 'Foreground', but from my manual tests both the policies work.
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.
I think 'Background' is fine.
@roycaihw please tell me if there is anything I can do to help the review process. Thank you for your time. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hedrox, yliaog 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 |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Tests that create Replication Controller objects don't clean pods upon deletion
Which issue(s) this PR fixes:
Fixes #242
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: