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
kubelet: Fix racy kubelet tests. #7980
Conversation
8f1c8be
to
0d7ea94
Compare
40a9c7f
to
f2b5e4f
Compare
Thanks @yifan-gu for the PR! Looks good overall. My only concern is that we would be testing the behaviors of the pod workers in kubelet_tests.go without using the actually pod workers. The fake pod_worker may eventually deviate from the actually implementation as time goes by. Ideally, we would want to move away from examining all docker calls in details in kubelet_test.go, but this may not be done for a while. Maybe we can add one or two tests for the fake pod worker to verify that it's issuing the same docker calls as the actual pod worker? What do you think about it? We can do this in a followup PR, or if you are busy with other things, feel free to file an issue. I can grab it when I have time :) |
LGTM overall. I am ok to merge the pr with TODOs based on @yujuhong's comments. Thanks! |
@yujuhong Yes I see your concern. I think we can add tests for the fake one to verify it invokes |
Tests added, PTAL, thanks! @yujuhong @dchen1107 |
8f9c2ee
to
ad2a9cb
Compare
LGTM. Thanks! |
Add fakePodWorkders to run syncPod() in serial for testing.
ad2a9cb
to
85b4530
Compare
@yifan-gu, did you kick off shippable/travis build or are they just taking forever to finish? |
@yujuhong NM, I just noticed there is a build failure by my fault, so I fixed it and rebased. Wait for travis now :) |
Flake in one of the shippable build, but the other build passed. Merging. |
kubelet: Fix racy kubelet tests.
@yujuhong What flakes? It that related? |
Nope. It's the good old pod status not being reported in time bug #6651. |
Add fakePodWorkders to run syncPod() in serial for testing.
Fix #7788
//cc @yujuhong @vmarmol @dchen1107