Skip to content

Commit

Permalink
test/e2e: Bump additional alerting rule timeout
Browse files Browse the repository at this point in the history
The additional alerting rule is deployed after initial setup, therefore
it relies on a ConfigMap remount to happen, which may take up to 5
minutes.
  • Loading branch information
brancz committed Feb 25, 2019
1 parent 836ff4d commit e1e7ba7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions test/e2e/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ func TestQueryPrometheus(t *testing.T) {
},
}

RunTestQueries(t, queries)
RunTestQueries(t, time.Minute, queries)
}

func RunTestQueries(t *testing.T, queries []Query) {
func RunTestQueries(t *testing.T, timeout time.Duration, queries []Query) {
promClient, err := framework.NewPrometheusClient(f.OpenshiftRouteClient, f.KubeClient)
if err != nil {
t.Fatal(err)
Expand All @@ -148,7 +148,7 @@ func RunTestQueries(t *testing.T, queries []Query) {
t.Fatal(errors.Wrapf(err, "wait for prometheus-k8s: %v", loopErr))
}

err = wait.Poll(5*time.Second, 1*time.Minute, func() (bool, error) {
err = wait.Poll(5*time.Second, timeout, func() (bool, error) {
defer t.Log("---------------------------\n")

for _, q := range queries {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/multi_namespace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func TestMultinamespacePrometheusRule(t *testing.T) {
log.Fatal(err)
}

RunTestQueries(t, []Query{
RunTestQueries(t, 10*time.Minute, []Query{
{
Query: `ALERTS{alertname="AdditionalTestAlertRule"} == 1`,
ExpectN: 1,
Expand Down

0 comments on commit e1e7ba7

Please sign in to comment.