Skip to content

Commit

Permalink
[serve] Fix long running failure test (#11805)
Browse files Browse the repository at this point in the history
  • Loading branch information
edoakes authored Nov 9, 2020
1 parent 407a212 commit 2feba44
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions release/long_running_tests/workloads/serve_failure.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@

@ray.remote
class RandomKiller:
def __init__(self, client, kill_period_s=1):
self.client = client
def __init__(self, kill_period_s=1):
self.client = serve.connect()
self.kill_period_s = kill_period_s

def _get_all_serve_actors(self):
Expand All @@ -55,8 +55,8 @@ def run(self):


class RandomTest:
def __init__(self, client, max_endpoints=1):
self.client = client
def __init__(self, serve_client, max_endpoints=1):
self.client = serve_client
self.max_endpoints = max_endpoints
self.weighted_actions = [
(self.create_endpoint, 1),
Expand Down Expand Up @@ -114,8 +114,8 @@ def run(self):
iteration += 1


random_killer = RandomKiller.remote(client)
random_killer = RandomKiller.remote()
random_killer.run.remote()
# Subtract 4 from the CPUs available for master, router, HTTP proxy,
# and metric monitor actors.
RandomTest(client, max_endpoints=(num_nodes * cpus_per_node) - 4).run()
# Subtract 1 CPU for the controller and 1 CPU from each node for the HTTP
# server.
RandomTest(client, max_endpoints=(num_nodes * (cpus_per_node - 1)) - 1).run()

0 comments on commit 2feba44

Please sign in to comment.