mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-09 21:21:14 +00:00
Revert "improve e2e retry logic with standard wait.Poll()"
This commit is contained in:
@@ -26,7 +26,6 @@ import (
|
||||
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/util/wait"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
@@ -150,14 +149,13 @@ func validateGuestbookApp(c *client.Client, ns string) {
|
||||
|
||||
// Returns whether received expected response from guestbook on time.
|
||||
func waitForGuestbookResponse(c *client.Client, cmd, arg, expectedResponse string, timeout time.Duration, ns string) bool {
|
||||
expectNoError(wait.Poll(5*time.Second, timeout, func() (bool, error) {
|
||||
for start := time.Now(); time.Since(start) < timeout; time.Sleep(5 * time.Second) {
|
||||
res, err := makeRequestToGuestbook(c, cmd, arg, ns)
|
||||
if err == nil && res == expectedResponse {
|
||||
return true, nil
|
||||
return true
|
||||
}
|
||||
return false, nil
|
||||
}))
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func makeRequestToGuestbook(c *client.Client, cmd, value string, ns string) (string, error) {
|
||||
|
Reference in New Issue
Block a user