Skip to content

Commit a90c6bc

Browse files
committed
Initial scheduler test fixes
Signed-off-by: Samuel Monson <[email protected]>
1 parent b123d15 commit a90c6bc

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

tests/unit/scheduler/test_constraints.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,11 +286,11 @@ def test_create_constraint_raises(self, valid_instances):
286286
def test_call_raises(self, valid_instances):
287287
"""Test that calling constraint raises RuntimeError."""
288288
instance, _ = valid_instances
289-
state = SchedulerState(node_id="test_node", num_processes=1, start_time=0.0)
289+
state = SchedulerState(node_id=0, num_processes=1, start_time=0.0)
290290
request = ScheduledRequestInfo(
291291
request_id="test_request",
292292
status="pending",
293-
scheduler_node_id="test_node",
293+
scheduler_node_id=0,
294294
scheduler_process_id=1,
295295
scheduler_start_time=0.0,
296296
)

tests/unit/scheduler/test_environment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ async def test_sync_run_start(self, valid_instances, mock_time, delay, expected)
246246

247247
with (
248248
patch("time.time", return_value=mock_time),
249-
patch("guidellm.scheduler.environment.settings") as mock_settings,
249+
patch("guidellm.scheduler.environments.settings") as mock_settings,
250250
):
251251
mock_settings.scheduler_start_delay_non_distributed = delay
252252
start_time = await instance.sync_run_start()

tests/unit/scheduler/test_objects.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def test_generic_type_parameters(self):
110110

111111
if hasattr(generic_base, "__args__"):
112112
type_params = generic_base.__args__
113-
assert len(type_params) == 3, "Should have 3 type parameters"
113+
assert len(type_params) == 2, "Should have 2 type parameters"
114114
param_names = [param.__name__ for param in type_params]
115115
expected_names = ["RequestT", "ResponseT"]
116116
assert param_names == expected_names
@@ -119,7 +119,7 @@ def test_generic_type_parameters(self):
119119
def test_implementation_construction(self):
120120
"""Test that a complete concrete implementation can be instantiated."""
121121

122-
class ConcreteBackend(BackendInterface[str, MeasuredRequestTimings, str]):
122+
class ConcreteBackend(BackendInterface[str, str]):
123123
@property
124124
def processes_limit(self) -> int | None:
125125
return 4
@@ -162,7 +162,7 @@ async def resolve(
162162
async def test_implementation_async_methods(self): # noqa: C901
163163
"""Test that async methods work correctly in concrete implementation."""
164164

165-
class AsyncBackend(BackendInterface[dict, MeasuredRequestTimings, dict]):
165+
class AsyncBackend(BackendInterface[dict, dict]):
166166
def __init__(self):
167167
self.startup_called = False
168168
self.validate_called = False
@@ -434,7 +434,6 @@ def valid_instances(self, request):
434434
@pytest.mark.smoke
435435
def test_class_signatures(self):
436436
"""Test MeasuredRequestTimings inheritance and type relationships."""
437-
assert issubclass(MeasuredRequestTimings, StandardBaseModel)
438437
assert hasattr(MeasuredRequestTimings, "model_dump")
439438
assert hasattr(MeasuredRequestTimings, "model_validate")
440439

0 commit comments

Comments
 (0)