e4ca337e16bf4f0f749161932038665cefe7391e,python/ray/serve/tests/test_failure.py,,test_controller_failure,#Any#,26

Before Change


        return "hello1"

    serve.create_backend("controller_failure:v1", function)
    serve.create_endpoint(
        "controller_failure",
        backend="controller_failure:v1",
        route="/controller_failure")

    assert request_with_retries(
        "/controller_failure", timeout=1).text == "hello1"

    for _ in range(10):
        response = request_with_retries("/controller_failure", timeout=30)
        assert response.text == "hello1"

    ray.kill(serve.api._global_client._controller, no_restart=False)

    for _ in range(10):
        response = request_with_retries("/controller_failure", timeout=30)
        assert response.text == "hello1"

    def function(_):
        return "hello2"

    ray.kill(serve.api._global_client._controller, no_restart=False)

    serve.create_backend("controller_failure:v2", function)
    serve.set_traffic("controller_failure", {"controller_failure:v2": 1.0})

    def check_controller_failure():
        response = request_with_retries("/controller_failure", timeout=30)
        return response.text == "hello2"

    wait_for_condition(check_controller_failure)

    def function(_):
        return "hello3"

    ray.kill(serve.api._global_client._controller, no_restart=False)
    serve.create_backend("controller_failure_2", function)
    ray.kill(serve.api._global_client._controller, no_restart=False)
    serve.create_endpoint(
        "controller_failure_2",
        backend="controller_failure_2",
        route="/controller_failure_2")
    ray.kill(serve.api._global_client._controller, no_restart=False)

    for _ in range(10):
        response = request_with_retries("/controller_failure", timeout=30)

After Change


        return "hello3"

    ray.kill(serve.api._global_client._controller, no_restart=False)
    function3.deploy()
    ray.kill(serve.api._global_client._controller, no_restart=False)

    for _ in range(10):
        response = request_with_retries("/controller_failure", timeout=30)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: ray-project/ray
Commit Name: e4ca337e16bf4f0f749161932038665cefe7391e
Time: 2021-04-08
Author: ed.nmi.oakes@gmail.com
File Name: python/ray/serve/tests/test_failure.py
Class Name:
Method Name: test_controller_failure


Project Name: ray-project/ray
Commit Name: e4ca337e16bf4f0f749161932038665cefe7391e
Time: 2021-04-08
Author: ed.nmi.oakes@gmail.com
File Name: python/ray/serve/tests/test_regression.py
Class Name:
Method Name: test_np_in_composed_model


Project Name: ray-project/ray
Commit Name: e4ca337e16bf4f0f749161932038665cefe7391e
Time: 2021-04-08
Author: ed.nmi.oakes@gmail.com
File Name: python/ray/serve/tests/test_handle.py
Class Name:
Method Name: test_handle_in_endpoint