Skip to content

Commit d19d7f2

Browse files
fix: use framework default timeout in ns tests (#335)
This commit makes it so DefaultTimeout is used accordingly among the different tests and assertions. Signed-off-by: Daniel Mellado <[email protected]>
1 parent fca1667 commit d19d7f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/e2e/monitoring_stack_controller_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -855,15 +855,15 @@ func namespaceSelectorTest(t *testing.T) {
855855
stopChan := make(chan struct{})
856856
defer close(stopChan)
857857
//nolint
858-
if pollErr := wait.Poll(15*time.Second, 5*time.Minute, func() (bool, error) {
858+
if pollErr := wait.Poll(15*time.Second, framework.DefaultTestTimeout, func() (bool, error) {
859859
err := f.StartServicePortForward(ms.Name+"-prometheus", e2eTestNamespace, "9090", stopChan)
860860
return err == nil, nil
861861
}); pollErr != nil {
862862
t.Fatal(pollErr)
863863
}
864864

865865
promClient := framework.NewPrometheusClient("http://localhost:9090")
866-
if pollErr := wait.PollUntilContextTimeout(context.Background(), 5*time.Second, 5*time.Minute, true, func(ctx context.Context) (bool, error) {
866+
if pollErr := wait.PollUntilContextTimeout(context.Background(), 5*time.Second, framework.DefaultTestTimeout, true, func(ctx context.Context) (bool, error) {
867867
query := `version{pod="prometheus-example-app",namespace=~"test-ns-.*"}`
868868
result, err := promClient.Query(query)
869869
if err != nil {

0 commit comments

Comments
 (0)