@@ -38,7 +38,17 @@ func TestCompatibility(t *testing.T) {
3838 // Install a Coherence deployment
3939 d , err := helper .NewSingleCoherenceFromYaml (ns , "coherence.yaml" )
4040 g .Expect (err ).NotTo (HaveOccurred ())
41- err = testContext .Client .Create (context .TODO (), & d )
41+
42+ err = nil
43+ for i := 0 ; i < 10 ; i ++ {
44+ err = testContext .Client .Create (context .TODO (), & d )
45+ if err == nil {
46+ break
47+ }
48+ t .Logf ("Coherence cluster install failed, will retry in 5 seconds: %s" , err .Error ())
49+ time .Sleep (5 * time .Second )
50+ }
51+
4252 g .Expect (err ).NotTo (HaveOccurred ())
4353 stsBefore := assertDeploymentEventuallyInDesiredState (t , d , d .GetReplicas ())
4454
@@ -88,6 +98,8 @@ func InstallPreviousVersion(g *GomegaWithT, ns, name, version, selector string)
8898 pods , err := helper .WaitForPodsWithSelector (testContext , ns , selector , time .Second * 10 , time .Minute * 5 )
8999 g .Expect (err ).NotTo (HaveOccurred ())
90100 g .Expect (len (pods )).To (Equal (1 ))
101+ err = helper .WaitForPodReady (testContext .KubeClient , ns , pods [0 ].Name , time .Second * 10 , time .Minute * 5 )
102+ g .Expect (err ).NotTo (HaveOccurred ())
91103}
92104
93105func InstallCurrentVersion (g * GomegaWithT , ns , name string ) {
@@ -106,6 +118,8 @@ func InstallCurrentVersion(g *GomegaWithT, ns, name string) {
106118 pods , err := helper .WaitForOperatorPods (testContext , ns , time .Second * 10 , time .Minute * 5 )
107119 g .Expect (err ).NotTo (HaveOccurred ())
108120 g .Expect (len (pods )).To (Equal (1 ))
121+ err = helper .WaitForPodReady (testContext .KubeClient , ns , pods [0 ].Name , time .Second * 10 , time .Minute * 5 )
122+ g .Expect (err ).NotTo (HaveOccurred ())
109123}
110124
111125func CleanupBlind (t * testing.T , namespace , name string ) {
0 commit comments