Skip to content

Commit

Permalink
[CI] Remove RayService tests from comopatibility-test.py (ray-project…
Browse files Browse the repository at this point in the history
…#1395)

[CI] Remove RayService tests from comopatibility-test.py
  • Loading branch information
kevin85421 authored Sep 5, 2023
1 parent d4041fb commit 9382cff
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions tests/compatibility-test.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
#!/usr/bin/env python
import logging
import unittest
import time
import os
import random
import string

import kuberay_utils.utils as utils
from framework.prototype import (
CurlServiceRule,
EasyJobRule,
RuleSet,
show_cluster_info
)

Expand Down Expand Up @@ -257,37 +254,6 @@ def test_terminated_raycontainer(self):
utils.wait_for_new_head(CONST.CREATE_NEW_POD, old_head_pod_name, restart_count,
RayFTTestCase.ray_cluster_ns, timeout=300, retry_interval_ms=1000)

class RayServiceTestCase(unittest.TestCase):
"""Integration tests for RayService"""
service_template = 'tests/config/ray-service.yaml.template'

# The previous logic for testing updates was problematic.
# We need to test RayService updates.
@classmethod
def setUpClass(cls):
if not utils.is_feature_supported(ray_version, CONST.RAY_SERVICE):
raise unittest.SkipTest(f"{CONST.RAY_SERVICE} is not supported")
K8S_CLUSTER_MANAGER.delete_kind_cluster()
K8S_CLUSTER_MANAGER.create_kind_cluster()
image_dict = {
CONST.RAY_IMAGE_KEY: ray_image,
CONST.OPERATOR_IMAGE_KEY: kuberay_operator_image
}
operator_manager = OperatorManager(image_dict)
operator_manager.prepare_operator()

def test_ray_serve_work(self):
"""Create a RayService, send a request to RayService via `curl`, and compare the result."""
cr_event = utils.create_ray_service(
RayServiceTestCase.service_template, ray_version, ray_image)
# When Pods are READY and RUNNING, RayService still needs tens of seconds to be ready
# for serving requests. This `sleep` function is a workaround, and should be removed
# when https://github.com/ray-project/kuberay/pull/730 is merged.
time.sleep(60)
query = {"path": "/", "json_args": ["MANGO", 2], "expected_output": "6"}
cr_event.rulesets = [RuleSet([CurlServiceRule([query])])]
cr_event.check_rule_sets()

def parse_environment():
global ray_version, ray_image, kuberay_operator_image
for k, v in os.environ.items():
Expand Down

0 comments on commit 9382cff

Please sign in to comment.