use PollUntilContextTimeout to replace PollImmediateWithContext in test
Signed-off-by: bzsuni <bingzhe.sun@daocloud.io>
This commit is contained in:
@@ -1826,7 +1826,7 @@ func lastLine(out string) string {
|
||||
}
|
||||
|
||||
func pollReadWithTimeout(ctx context.Context, statefulPod statefulPodTester, statefulPodNumber int, key, expectedVal string) error {
|
||||
err := wait.PollImmediateWithContext(ctx, time.Second, readTimeout, func(ctx context.Context) (bool, error) {
|
||||
err := wait.PollUntilContextTimeout(ctx, time.Second, readTimeout, true, func(ctx context.Context) (bool, error) {
|
||||
val := statefulPod.read(statefulPodNumber, key)
|
||||
if val == "" {
|
||||
return false, nil
|
||||
|
Reference in New Issue
Block a user