Skip to content

Commit

Permalink
Use framework default timeout in ns tests
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 <dmellado@redhat.com>
  • Loading branch information
danielmellado committed Aug 14, 2023
1 parent 3f29722 commit e612254
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 e612254

Please sign in to comment.