@@ -13,8 +13,8 @@ import (
13
13
dto "github.com/prometheus/client_model/go"
14
14
"github.com/prometheus/common/expfmt"
15
15
16
+ apps "k8s.io/api/apps/v1beta1"
16
17
"k8s.io/api/core/v1"
17
- extensions "k8s.io/api/extensions/v1beta1"
18
18
kapierrs "k8s.io/apimachinery/pkg/api/errors"
19
19
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
20
20
"k8s.io/apimachinery/pkg/watch"
@@ -26,6 +26,8 @@ import (
26
26
exutil "github.com/openshift/origin/test/extended/util"
27
27
)
28
28
29
+ const waitForPrometheusStartSeconds = 240
30
+
29
31
var _ = g .Describe ("[Feature:Prometheus][Conformance] Prometheus" , func () {
30
32
defer g .GinkgoRecover ()
31
33
var (
@@ -49,7 +51,7 @@ var _ = g.Describe("[Feature:Prometheus][Conformance] Prometheus", func() {
49
51
g .By ("checking the unsecured metrics path" )
50
52
success := false
51
53
var metrics map [string ]* dto.MetricFamily
52
- for i := 0 ; i < 120 ; i ++ {
54
+ for i := 0 ; i < waitForPrometheusStartSeconds ; i ++ {
53
55
results , err := getInsecureURLViaPod (ns , execPodName , fmt .Sprintf ("https://%s:%d/metrics" , host , statsPort ))
54
56
if err != nil {
55
57
e2e .Logf ("unable to get unsecured metrics: %v" , err )
@@ -315,7 +317,8 @@ func bringUpPrometheusFromTemplate(oc *exutil.CLI) (ns, host, bearerToken string
315
317
if err != nil {
316
318
fmt .Fprintf (g .GinkgoWriter , "test continuing, but create on the prometheus template resulted in: %#v" , err )
317
319
}
318
- e2e .WaitForDeploymentComplete (oc .AdminKubeClient (), & extensions.Deployment {ObjectMeta : metav1.ObjectMeta {Name : "prometheus" , Namespace : "kube-system" }})
320
+ tester := e2e .NewStatefulSetTester (oc .AdminKubeClient ())
321
+ tester .WaitForRunningAndReady (1 , & apps.StatefulSet {ObjectMeta : metav1.ObjectMeta {Name : "prometheus" , Namespace : "kube-system" }})
319
322
}
320
323
321
324
waitForServiceAccountInNamespace (oc .AdminKubeClient (), "kube-system" , "prometheus" , 2 * time .Minute )
0 commit comments