Skip to content

Commit

Permalink
e2e: ctx should not be cancelled per resource (#385)
Browse files Browse the repository at this point in the history
Signed-off-by: spacewander <[email protected]>
  • Loading branch information
spacewander authored Mar 16, 2024
1 parent 6737fe9 commit b982bc1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions e2e/pkg/k8s/k8s.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ func Prepare(t *testing.T, client client.Client, source string) {
require.NoErrorf(t, err, "error parsing manifest", "manifest: %s", input.String())
}

for _, res := range resources {
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second)
defer cancel()
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()

for _, res := range resources {
namespacedName := types.NamespacedName{Namespace: res.GetNamespace(), Name: res.GetName()}
fetchedObj := res.DeepCopy()
err := client.Get(ctx, namespacedName, fetchedObj)
Expand Down

0 comments on commit b982bc1

Please sign in to comment.