Unverified Commit bc1c2de1 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

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 ```
parents f4b24526 dfb88700
...@@ -642,8 +642,8 @@ func TestUpdateExistingNodeStatusTimeout(t *testing.T) { ...@@ -642,8 +642,8 @@ func TestUpdateExistingNodeStatusTimeout(t *testing.T) {
assert.Error(t, kubelet.updateNodeStatus()) assert.Error(t, kubelet.updateNodeStatus())
// should have attempted multiple times // should have attempted multiple times
if actualAttempts := atomic.LoadInt64(&attempts); actualAttempts != nodeStatusUpdateRetry { if actualAttempts := atomic.LoadInt64(&attempts); actualAttempts < nodeStatusUpdateRetry {
t.Errorf("Expected %d attempts, got %d", nodeStatusUpdateRetry, actualAttempts) t.Errorf("Expected at least %d attempts, got %d", nodeStatusUpdateRetry, actualAttempts)
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment