mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #62914 from sjenning/kubelet-unit-flake
Automatic merge from submit-queue (batch tested with PRs 62914, 63431). 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>. kubelet: fix flake in TestUpdateExistingNodeStatusTimeout xref https://github.com/openshift/origin/issues/19443 There are cases where some process, outside the test, attempts to connect to the port we are using to do the test, leading to a attempt count greater than what we expect. To deal with this, just ensure that we have seen *at least* the number of connection attempts we expect. @liggitt ```release-note NONE ```
This commit is contained in:
commit
bc1c2de163
@ -642,8 +642,8 @@ func TestUpdateExistingNodeStatusTimeout(t *testing.T) {
|
||||
assert.Error(t, kubelet.updateNodeStatus())
|
||||
|
||||
// should have attempted multiple times
|
||||
if actualAttempts := atomic.LoadInt64(&attempts); actualAttempts != nodeStatusUpdateRetry {
|
||||
t.Errorf("Expected %d attempts, got %d", nodeStatusUpdateRetry, actualAttempts)
|
||||
if actualAttempts := atomic.LoadInt64(&attempts); actualAttempts < nodeStatusUpdateRetry {
|
||||
t.Errorf("Expected at least %d attempts, got %d", nodeStatusUpdateRetry, actualAttempts)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user