Skip to content

Shutdown test server using terminate() #516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ def a_server(
# prepare some URLss
url = f"http://127.0.0.1:{an_unused_port}/"
canary_url = f"{url}favicon.ico"
shutdown_url = f"{url}api/shutdown?token={a_token}"

wait_until_urlopen(canary_url)

Expand All @@ -87,8 +86,7 @@ def a_server(

# clean up after server is no longer needed
print(f"{a_server_cmd} shutting down...", flush=True)
wait_until_urlopen(shutdown_url, data=[])
server_proc.wait()
server_proc.terminate()
print(f"{a_server_cmd} is stopped", flush=True)


Expand Down
Loading