Wire node memory and shard slot capabilities
This commit is contained in:
@@ -845,6 +845,25 @@ def test_tracker_registration_rejects_invalid_payload():
|
||||
tracker.stop()
|
||||
|
||||
|
||||
def test_tracker_registration_rejects_invalid_max_loaded_shards():
|
||||
tracker = TrackerServer()
|
||||
tracker_port = tracker.start()
|
||||
try:
|
||||
try:
|
||||
_post_json(
|
||||
f"http://127.0.0.1:{tracker_port}/v1/nodes/register",
|
||||
{"endpoint": "http://127.0.0.1:9001", "shard_start": 0, "shard_end": 31,
|
||||
"max_loaded_shards": 0, "hardware_profile": {}, "score": 1.0},
|
||||
)
|
||||
raise AssertionError("Expected 400 for invalid max_loaded_shards")
|
||||
except urllib.error.HTTPError as exc:
|
||||
assert exc.code == 400
|
||||
body = json.loads(exc.read())
|
||||
assert "capability values" in body["error"]
|
||||
finally:
|
||||
tracker.stop()
|
||||
|
||||
|
||||
def test_tracker_routes_only_nodes_for_requested_model():
|
||||
"""A node registered for one model cannot satisfy another model's route."""
|
||||
tracker = TrackerServer(model_presets={
|
||||
|
||||
Reference in New Issue
Block a user