JacobLinCool commited on
Commit
46a21ce
·
verified ·
1 Parent(s): cc3732a

fix: cap zerogpu allocation duration

Browse files
Files changed (1) hide show
  1. tests/test_model_runtime.py +4 -0
tests/test_model_runtime.py CHANGED
@@ -172,3 +172,7 @@ def test_zerogpu_duration_validates_positive_values(monkeypatch: pytest.MonkeyPa
172
  monkeypatch.setenv("ADVISOR_ZERO_GPU_DURATION", "0")
173
  with pytest.raises(RuntimeError, match="positive"):
174
  zero_gpu_duration_seconds()
 
 
 
 
 
172
  monkeypatch.setenv("ADVISOR_ZERO_GPU_DURATION", "0")
173
  with pytest.raises(RuntimeError, match="positive"):
174
  zero_gpu_duration_seconds()
175
+
176
+ monkeypatch.setenv("ADVISOR_ZERO_GPU_DURATION", "121")
177
+ with pytest.raises(RuntimeError, match="at most 120"):
178
+ zero_gpu_duration_seconds()