Skip to content

Commit

Permalink
remove time.sleep from test
Browse files Browse the repository at this point in the history
  • Loading branch information
KJlaccHoeUM9l committed Oct 11, 2021
1 parent 20d5c9f commit bbcf0cf
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tests/python/unittest/test_runtime_rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,12 @@ def test_rpc_tracker_request():

@tvm.testing.requires_rpc
def test_rpc_tracker_via_proxy():
"""
tracker
/ \
Host -- Proxy -- RPC server
"""

device_key = "test_device"

tracker_server = Tracker(port=9000, port_end=9100)
Expand All @@ -560,19 +566,17 @@ def test_rpc_tracker_via_proxy():
tracker_addr=(tracker_server.host, tracker_server.port),
is_proxy=True,
)
time.sleep(0.1)
server2 = rpc.Server(
host=proxy_server.host,
port=proxy_server.port,
key=device_key,
tracker_addr=(tracker_server.host, tracker_server.port),
is_proxy=True,
)
time.sleep(0.1)

client = rpc.connect_tracker(tracker_server.host, tracker_server.port)
summary = client.summary()
assert summary["queue_info"][device_key]["free"] == 2
remote1 = client.request(device_key, session_timeout=30) # pylint: disable=unused-variable
remote2 = client.request(device_key, session_timeout=30) # pylint: disable=unused-variable

server2.terminate()
server1.terminate()
Expand Down

0 comments on commit bbcf0cf

Please sign in to comment.