Skip to content

Commit

Permalink
Fixes for client/server tests with rc3 release (#465)
Browse files Browse the repository at this point in the history
<!-- Thank you for your contribution! Please review
https://github.com/autonomi-ai/nos/blob/main/docs/CONTRIBUTING.md before
opening a pull request. -->

<!-- Please add a reviewer to the assignee section when you create a PR.
If you don't have the access to it, we will shortly find a reviewer and
assign them to your PR. -->

## Summary

<!-- Please give a short summary of the change and the problem this
solves. -->

## Related issues

<!-- For example: "Closes #1234" -->

## Checks

- [ ] `make lint`: I've run `make lint` to lint the changes in this PR.
- [ ] `make test`: I've made sure the tests (`make test-cpu` or `make
test`) are passing.
- Additional tests:
   - [ ] Benchmark tests (when contributing new models)
   - [ ] GPU/HW tests
  • Loading branch information
spillai authored Nov 8, 2023
1 parent e40c178 commit fbf9347
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions nos/test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,10 @@ def local_http_client_with_server(grpc_server): # noqa: F811
"""Test local HTTP client with local runtime."""
from fastapi.testclient import TestClient

from nos.server.http._service import app
from nos.server.http._service import app_factory

# Yield the HTTP client once the server is up and initialized
with TestClient(app(grpc_port=GRPC_TEST_PORT)) as _client:
with TestClient(app_factory(address=f"[::]:{GRPC_TEST_PORT}")) as _client:
yield _client


Expand All @@ -237,10 +237,10 @@ def http_client_with_cpu_backend(grpc_server_docker_runtime_cpu): # noqa: F811
"""Test HTTP client with initialized CPU docker runtime (Port: 50053)."""
from fastapi.testclient import TestClient

from nos.server.http._service import app
from nos.server.http._service import app_factory

# Yield the HTTP client once the server is up and initialized
with TestClient(app(grpc_port=GRPC_TEST_PORT_CPU)) as _client:
with TestClient(app_factory(address=f"[::]:{GRPC_TEST_PORT_CPU}")) as _client:
yield _client


Expand All @@ -254,10 +254,10 @@ def http_client_with_gpu_backend(grpc_server_docker_runtime_gpu): # noqa: F811
"""Test HTTP client with initialized CPU docker runtime (Port: 50054)."""
from fastapi.testclient import TestClient

from nos.server.http._service import app
from nos.server.http._service import app_factory

# Yield the HTTP client once the server is up and initialized
with TestClient(app(grpc_port=GRPC_TEST_PORT_GPU)) as _client:
with TestClient(app_factory(address=f"[::]:{GRPC_TEST_PORT_GPU}")) as _client:
yield _client


Expand Down

0 comments on commit fbf9347

Please sign in to comment.