Merge pull request #28092 from Random-Liu/fix-node-problem-detector-e2e

Automatic merge from submit-queue

Fix node problem detector e2e flake

Fix #28069.

The [original code](https://github.com/kubernetes/kubernetes/blob/master/test/e2e/node_problem_detector.go#L198-L204) assumes the test condition will be generated after 5s ([`pollConsistently`](https://github.com/kubernetes/kubernetes/blob/master/test/e2e/node_problem_detector.go#L39)), however sometimes that may not be enough, see #28096

So, this PR changes it to use `Eventually` instead of `Consistently` to make the code waits longer before the test condition to be generated. The original `Consistently` checking is a bit redundant, so I removed it.

@dchen1107 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
This commit is contained in:
k8s-merge-robot 2016-06-28 09:18:16 -07:00 committed by GitHub
commit 86357b8deb

View File

@ -199,8 +199,8 @@ var _ = framework.KubeDescribe("NodeProblemDetector", func() {
Consistently(func() error {
return verifyNoEvents(c.Events(eventNamespace), eventListOptions)
}, pollConsistent, pollInterval).Should(Succeed())
By("Make sure the default node condition is false")
Consistently(func() error {
By("Make sure the default node condition is generated")
Eventually(func() error {
return verifyCondition(c.Nodes(), node.Name, condition, api.ConditionFalse, defaultReason, defaultMessage)
}, pollConsistent, pollInterval).Should(Succeed())