diff --git a/tests/integration/ray_test.go b/tests/integration/ray_test.go index 0db8bce6..365b0b39 100644 --- a/tests/integration/ray_test.go +++ b/tests/integration/ray_test.go @@ -18,6 +18,7 @@ package integration import ( "encoding/base64" + "net/http" "net/url" "testing" @@ -168,6 +169,12 @@ func TestRayJobSubmissionRest(t *testing.T) { test.Expect(err).NotTo(HaveOccurred()) dashboardHostname := dashboard.Status.Ingress[0].Host + // Wait for 200 reply from dashboard route + test.Eventually(func() int { + resp, _ := http.Get("http://" + dashboardHostname) + return resp.StatusCode + }, support.TestTimeoutLong).Should(Equal(200)) + rayClient := support.NewRayClusterClient(url.URL{Scheme: "http", Host: dashboardHostname}) // Create Ray Job using REST API