Skip to content

Commit

Permalink
fix: use framework default timeout in ns tests (#335)
Browse files Browse the repository at this point in the history
This commit makes it so DefaultTimeout is used accordingly among the
different tests and assertions.

Signed-off-by: Daniel Mellado <[email protected]>
  • Loading branch information
danielmellado authored Aug 23, 2023
1 parent fca1667 commit d19d7f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/e2e/monitoring_stack_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -855,15 +855,15 @@ func namespaceSelectorTest(t *testing.T) {
stopChan := make(chan struct{})
defer close(stopChan)
//nolint
if pollErr := wait.Poll(15*time.Second, 5*time.Minute, func() (bool, error) {
if pollErr := wait.Poll(15*time.Second, framework.DefaultTestTimeout, func() (bool, error) {
err := f.StartServicePortForward(ms.Name+"-prometheus", e2eTestNamespace, "9090", stopChan)
return err == nil, nil
}); pollErr != nil {
t.Fatal(pollErr)
}

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

0 comments on commit d19d7f2

Please sign in to comment.