Skip to content

Commit

Permalink
wait in exec
Browse files Browse the repository at this point in the history
  • Loading branch information
jbohanon committed Jun 7, 2024
1 parent f1037a4 commit 2d6830e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions testutils/kube/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"io"
"strings"
"time"

"github.com/solo-io/go-utils/testutils/kubectl"
)
Expand Down Expand Up @@ -75,6 +76,10 @@ func ExecFromEphemeralPod(ctx context.Context, params EphemeralPodParams) (strin
Logger: params.Logger,
})

// this smells; fix it
// wait so the ephemeral container has a chance to be created before attempting to exec against it
time.Sleep(time.Second)

execArgs := []string{
"exec",
fmt.Sprintf("--container=%s", params.FromContainer),
Expand Down

0 comments on commit 2d6830e

Please sign in to comment.