Skip to content

Commit

Permalink
revert tests
Browse files Browse the repository at this point in the history
  • Loading branch information
spal1 committed Feb 27, 2025
1 parent a0ba879 commit 7f957db
Showing 1 changed file with 15 additions and 18 deletions.
33 changes: 15 additions & 18 deletions truss/tests/test_model_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -957,14 +957,14 @@ def predict(self, model_input):
restart_threshold_seconds: 1700
"""

# with ensure_kill_all(), _temp_truss(model, config) as tr:
# _ = tr.docker_run(local_port=8090, detach=True, wait_for_server_ready=True)
with ensure_kill_all(), _temp_truss(model, config) as tr:
_ = tr.docker_run(local_port=8090, detach=True, wait_for_server_ready=True)

# assert tr.spec.config.runtime.health_checks.restart_check_delay_seconds == 100
# assert tr.spec.config.runtime.health_checks.restart_threshold_seconds == 1700
# assert (
# tr.spec.config.runtime.health_checks.stop_traffic_threshold_seconds is None
# )
assert tr.spec.config.runtime.health_checks.restart_check_delay_seconds == 100
assert tr.spec.config.runtime.health_checks.restart_threshold_seconds == 1700
assert (
tr.spec.config.runtime.health_checks.stop_traffic_threshold_seconds is None
)

config = """runtime:
health_checks:
Expand All @@ -974,23 +974,20 @@ def predict(self, model_input):
"""

with ensure_kill_all(), _temp_truss(model, config) as tr:
container = tr.docker_run(
local_port=8090, detach=True, wait_for_server_ready=True
)
_ = tr.docker_run(local_port=8090, detach=True, wait_for_server_ready=True)

assert tr.spec.config.runtime.health_checks.restart_check_delay_seconds == 1200
assert tr.spec.config.runtime.health_checks.restart_threshold_seconds == 90
assert tr.spec.config.runtime.health_checks.stop_traffic_threshold_seconds == 50
print(container.logs())

# with ensure_kill_all(), _temp_truss(model, "") as tr:
# _ = tr.docker_run(local_port=8090, detach=True, wait_for_server_ready=True)
with ensure_kill_all(), _temp_truss(model, "") as tr:
_ = tr.docker_run(local_port=8090, detach=True, wait_for_server_ready=True)

# assert tr.spec.config.runtime.health_checks.restart_check_delay_seconds is None
# assert tr.spec.config.runtime.health_checks.restart_threshold_seconds is None
# assert (
# tr.spec.config.runtime.health_checks.stop_traffic_threshold_seconds is None
# )
assert tr.spec.config.runtime.health_checks.restart_check_delay_seconds is None
assert tr.spec.config.runtime.health_checks.restart_threshold_seconds is None
assert (
tr.spec.config.runtime.health_checks.stop_traffic_threshold_seconds is None
)


@pytest.mark.integration
Expand Down

0 comments on commit 7f957db

Please sign in to comment.