tqchen commented on a change in pull request #9210:
URL: https://github.com/apache/tvm/pull/9210#discussion_r725085648



##########
File path: tests/python/unittest/test_runtime_rpc.py
##########
@@ -538,3 +539,42 @@ def test_rpc_tracker_request():
     proc2.join()
     server.terminate()
     tracker.terminate()
+
+
[email protected]_rpc
+def test_rpc_tracker_via_proxy():
+    device_key = "test_device"
+
+    tracker_server = Tracker(port=9000, port_end=9100)
+    proxy_server = Proxy(
+        host=tracker_server.host,
+        port=8888,
+        port_end=8988,
+        tracker_addr=(tracker_server.host, tracker_server.port),
+    )
+
+    server1 = 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)
+    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

Review comment:
       relying on sleep can be unreliable and cause flaky errors(as in many 
past cases). Can we just not assert the query part and make sure connection to 
tracker is covered




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to