drop deprecated PollWithContext and adopt PollUntilContextTimeout instead

Signed-off-by: yintong.huang <yintong.huang@daocloud.io>
This commit is contained in:
yintong.huang
2024-06-21 19:23:31 +08:00
parent 5ec31e84d6
commit 2db1b321e0
27 changed files with 62 additions and 62 deletions

View File

@@ -132,7 +132,7 @@ func StartTestServer(ctx context.Context, customFlags []string) (result TestServ
if err != nil {
return result, fmt.Errorf("failed to create a client: %v", err)
}
err = wait.PollWithContext(ctx, 100*time.Millisecond, 30*time.Second, func(ctx context.Context) (bool, error) {
err = wait.PollUntilContextTimeout(ctx, 100*time.Millisecond, 30*time.Second, false, func(ctx context.Context) (bool, error) {
select {
case <-ctx.Done():
return false, ctx.Err()