Skip to content

Commit

Permalink
fix util
Browse files Browse the repository at this point in the history
  • Loading branch information
zack-is-cool committed Nov 28, 2023
1 parent 47f5f8d commit c3032ca
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,11 @@ func ValidateEFSFunctionality(t *testing.T, tempFolder string) {
namespace := "default"
jobName := "test-write"
timeout := 2 * time.Minute
// See https://github.com/kubernetes/kubernetes/issues/116712
//nolint:staticcheck
err = wait.PollImmediate(time.Second, timeout, func() (bool, error) {
job, err := clientset.BatchV1().Jobs(namespace).Get(context.Background(), jobName, metav1.GetOptions{})
err = wait.PollUntilContextTimeout(context.Background(), time.Second, timeout, true, func(ctx context.Context) (bool, error) {
job, err := clientset.BatchV1().Jobs(namespace).Get(ctx, jobName, metav1.GetOptions{})
if err != nil {
return false, fmt.Errorf("failed to get kubernetes jobs: %w", err)
}
// Check the job's status
for _, c := range job.Status.Conditions {
if c.Type == batchv1.JobComplete && c.Status == "True" {
return true, nil
Expand Down

0 comments on commit c3032ca

Please sign in to comment.