Skip to content

Commit be061ef

Browse files
authored
Increase poll timings for all ContainerSource tests (#8862)
fix(test): increase poll timings for all ContainerSource tests All ContainerSource tests were timing out after the default 2 minutes waiting for the ContainerSource resource to become ready or be deleted. Added environment.WithPollTimings(5*time.Second, 4*time.Minute) to all six ContainerSource tests to allow up to 4 minutes for: - Resource creation and readiness checks - Resource cleanup and deletion This fixes the timeout in TestContainerSourceSendsEventsWithOIDC: "wait.go:136: containersource-nggzhiqj not found containersources.sources.knative.dev" Tests updated: - TestContainerSourceWithSinkRef - TestContainerSourceWithSinkURI - TestContainerSourceWithCloudEventOverrides - TestContainerSourceWithArgs - TestContainerSourceWithTLS - TestContainerSourceSendsEventsWithOIDC
1 parent 47d1156 commit be061ef

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/rekt/container_source_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ package rekt
2121

2222
import (
2323
"testing"
24+
"time"
2425

2526
"knative.dev/pkg/system"
2627
"knative.dev/reconciler-test/pkg/environment"
@@ -40,6 +41,7 @@ func TestContainerSourceWithSinkRef(t *testing.T) {
4041
knative.WithObservabilityConfig,
4142
k8s.WithEventListener,
4243
environment.Managed(t),
44+
environment.WithPollTimings(5*time.Second, 4*time.Minute),
4345
)
4446
t.Cleanup(env.Finish)
4547

@@ -55,6 +57,7 @@ func TestContainerSourceWithSinkURI(t *testing.T) {
5557
knative.WithObservabilityConfig,
5658
k8s.WithEventListener,
5759
environment.Managed(t),
60+
environment.WithPollTimings(5*time.Second, 4*time.Minute),
5861
)
5962

6063
env.Test(ctx, t, containersource.SendsEventsWithSinkURI())
@@ -69,6 +72,7 @@ func TestContainerSourceWithCloudEventOverrides(t *testing.T) {
6972
knative.WithObservabilityConfig,
7073
k8s.WithEventListener,
7174
environment.Managed(t),
75+
environment.WithPollTimings(5*time.Second, 4*time.Minute),
7276
)
7377

7478
env.Test(ctx, t, containersource.SendsEventsWithCloudEventOverrides())
@@ -83,6 +87,7 @@ func TestContainerSourceWithArgs(t *testing.T) {
8387
knative.WithObservabilityConfig,
8488
k8s.WithEventListener,
8589
environment.Managed(t),
90+
environment.WithPollTimings(5*time.Second, 4*time.Minute),
8691
)
8792

8893
env.Test(ctx, t, containersource.SendsEventsWithArgs())
@@ -98,6 +103,7 @@ func TestContainerSourceWithTLS(t *testing.T) {
98103
k8s.WithEventListener,
99104
environment.Managed(t),
100105
eventshub.WithTLS(t),
106+
environment.WithPollTimings(5*time.Second, 4*time.Minute),
101107
)
102108

103109
env.ParallelTest(ctx, t, containersource.SendEventsWithTLSRecieverAsSink())
@@ -114,6 +120,7 @@ func TestContainerSourceSendsEventsWithOIDC(t *testing.T) {
114120
k8s.WithEventListener,
115121
environment.Managed(t),
116122
eventshub.WithTLS(t),
123+
environment.WithPollTimings(5*time.Second, 4*time.Minute),
117124
)
118125

119126
env.Test(ctx, t, containersource.SendsEventsWithSinkRefOIDC())

0 commit comments

Comments
 (0)