Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SVLT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ALMF
SVLT
Commits
a44e8a96
Commit
a44e8a96
authored
9 months ago
by
Christopher Randolph Rhodes
Browse files
Options
Downloads
Patches
Plain Diff
Also join server process on teardown, this corrected some multiprocess spillover issues e.g. STDOUT
parent
d1d2ebe8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_api.py
+5
-1
5 additions, 1 deletion
tests/test_api.py
with
5 additions
and
1 deletion
tests/test_api.py
+
5
−
1
View file @
a44e8a96
...
...
@@ -15,7 +15,7 @@ class TestServerBaseClass(unittest.TestCase):
def
setUp
(
self
)
->
None
:
import
uvicorn
host
=
'
127.0.0.1
'
port
=
5001
port
=
5001
# TODO: defer to run_server script and conf file
self
.
server_process
=
Process
(
target
=
uvicorn
.
run
,
...
...
@@ -26,6 +26,8 @@ class TestServerBaseClass(unittest.TestCase):
self
.
uri
=
f
'
http://
{
host
}
:
{
port
}
/
'
self
.
server_process
.
start
()
print
(
'
started server process
'
)
def
_get_sesh
(
self
):
sesh
=
requests
.
Session
()
retries
=
Retry
(
...
...
@@ -58,6 +60,7 @@ class TestServerBaseClass(unittest.TestCase):
def
tearDown
(
self
)
->
None
:
self
.
server_process
.
terminate
()
self
.
server_process
.
join
()
class
TestApiFromAutomatedClient
(
TestServerBaseClass
):
def
test_trivial_api_response
(
self
):
...
...
@@ -73,6 +76,7 @@ class TestApiFromAutomatedClient(TestServerBaseClass):
def
test_default_session_paths
(
self
):
import
model_server.conf.defaults
resp
=
self
.
_get
(
'
paths
'
)
print
(
resp
.
json
()[
'
outbound_images
'
])
conf_root
=
model_server
.
conf
.
defaults
.
root
for
p
in
[
'
inbound_images
'
,
'
outbound_images
'
,
'
logs
'
]:
self
.
assertTrue
(
resp
.
json
()[
p
].
startswith
(
conf_root
.
__str__
()))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment