Skip to content

Commit

Permalink
[RayCluster][Feature] skip suspending worker groups if the RayJobDele…
Browse files Browse the repository at this point in the history
…tionPolicy feature flag is not enabled

Signed-off-by: Rueian <[email protected]>
  • Loading branch information
rueian committed Jan 17, 2025
1 parent d0cbf34 commit 993fc64
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ray-operator/controllers/ray/rayjob_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,6 @@ var _ = Context("RayJob with different submission modes", func() {
})

Describe("RayJob with DeletionPolicy=DeleteWorkers", Ordered, func() {

ctx := context.Background()
namespace := "default"
rayJob := rayJobTemplate("rayjob-test-deletionpolicy-deleteworkers", namespace)
Expand Down Expand Up @@ -1112,6 +1111,10 @@ var _ = Context("RayJob with different submission modes", func() {
rayJob.Spec.ShutdownAfterJobFinishes = false
rayCluster := &rayv1.RayCluster{}

BeforeAll(func() {
DeferCleanup(features.SetFeatureGateDuringTest(GinkgoTB(), features.RayJobDeletionPolicy, true))
})

It("Create a RayJob custom resource", func() {
err := k8sClient.Create(ctx, rayJob)
Expect(err).NotTo(HaveOccurred(), "Failed to create RayJob")
Expand Down

0 comments on commit 993fc64

Please sign in to comment.