From f1ca5c847edded382652de17fbfb49bbf9830bf6 Mon Sep 17 00:00:00 2001 From: Jiri Petrlik Date: Tue, 5 Sep 2023 17:08:03 +0200 Subject: [PATCH] Fix the failing TestRayJobSubmissionRest test --- tests/integration/ray_test.go | 7 +++++++ 1 file changed, 7 insertions(+) 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