Skip to content

Commit 2d6830e

Browse files
committed
wait in exec
1 parent f1037a4 commit 2d6830e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

testutils/kube/exec.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"fmt"
66
"io"
77
"strings"
8+
"time"
89

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

79+
// this smells; fix it
80+
// wait so the ephemeral container has a chance to be created before attempting to exec against it
81+
time.Sleep(time.Second)
82+
7883
execArgs := []string{
7984
"exec",
8085
fmt.Sprintf("--container=%s", params.FromContainer),

0 commit comments

Comments
 (0)