use PollUntilContextTimeout to replace PollImmediateWithContext in test
Signed-off-by: bzsuni <bingzhe.sun@daocloud.io>
This commit is contained in:
@@ -352,7 +352,7 @@ func CreateTestingNS(ctx context.Context, baseName string, c clientset.Interface
|
||||
}
|
||||
// Be robust about making the namespace creation call.
|
||||
var got *v1.Namespace
|
||||
if err := wait.PollImmediateWithContext(ctx, Poll, 30*time.Second, func(ctx context.Context) (bool, error) {
|
||||
if err := wait.PollUntilContextTimeout(ctx, Poll, 30*time.Second, true, func(ctx context.Context) (bool, error) {
|
||||
var err error
|
||||
got, err = c.CoreV1().Namespaces().Create(ctx, namespaceObj, metav1.CreateOptions{})
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user