mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-30 15:02:23 +00:00
Merge pull request #52640 from mYmNeo/ut
Automatic merge from submit-queue (batch tested with PRs 60346, 60135, 60289, 59643, 52640). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Correct TestUpdatePod comment Signed-off-by: mYmNeo <thomassong2012@gmail.com> **What this PR does / why we need it**: Correct TestUpdatePod comment **Which issue this PR fixes** The original one wants to check whether all updates has been caught by podWorker, but podWorker can guarantee only the first event and the last one will processed. Correct the comment if others misunderstand the unit test.
This commit is contained in:
commit
1e95c7f856
@ -128,7 +128,6 @@ func drainWorkers(podWorkers *podWorkers, numPods int) {
|
||||
func TestUpdatePod(t *testing.T) {
|
||||
podWorkers, processed := createPodWorkers()
|
||||
|
||||
// Check whether all pod updates will be processed.
|
||||
numPods := 20
|
||||
for i := 0; i < numPods; i++ {
|
||||
for j := i; j < numPods; j++ {
|
||||
@ -151,6 +150,7 @@ func TestUpdatePod(t *testing.T) {
|
||||
continue
|
||||
}
|
||||
|
||||
// PodWorker guarantees the first and the last event will be processed
|
||||
first := 0
|
||||
last := len(processed[uid]) - 1
|
||||
if processed[uid][first].name != string(0) {
|
||||
|
Loading…
Reference in New Issue
Block a user