Skip to content

Commit

Permalink
[logstream] test polling should use a different context
Browse files Browse the repository at this point in the history
  • Loading branch information
dprotaso committed Jun 21, 2024
1 parent 915c009 commit 9975908
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/logstream/v2/stream_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,9 @@ func TestNamespaceStream(t *testing.T) {

// We can't assume that the cancel signal doesn't race the pod creation signal, so
// we retry a few times to give some leeway.
if err := wait.PollUntilContextTimeout(ctx, 10*time.Millisecond, time.Second, true, func(ctx context.Context) (bool, error) {
if _, err := podClient.Create(context.Background(), knativePod, metav1.CreateOptions{}); err != nil {
pollCtx := context.Background()
if err := wait.PollUntilContextTimeout(pollCtx, 10*time.Millisecond, time.Second, true, func(ctx context.Context) (bool, error) {
if _, err := podClient.Create(pollCtx, knativePod, metav1.CreateOptions{}); err != nil {
return false, err
}

Expand Down

0 comments on commit 9975908

Please sign in to comment.