Skip to content

Commit 8b0ca9c

Browse files
committed
Shutdown test server using terminate()
`GET api/shutdown?token=token` is not supported
1 parent b0c7feb commit 8b0ca9c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tests/conftest.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ def a_server(
7777
# prepare some URLss
7878
url = f"http://127.0.0.1:{an_unused_port}/"
7979
canary_url = f"{url}favicon.ico"
80-
shutdown_url = f"{url}api/shutdown?token={a_token}"
8180

8281
wait_until_urlopen(canary_url)
8382

@@ -87,8 +86,7 @@ def a_server(
8786

8887
# clean up after server is no longer needed
8988
print(f"{a_server_cmd} shutting down...", flush=True)
90-
wait_until_urlopen(shutdown_url, data=[])
91-
server_proc.wait()
89+
server_proc.terminate()
9290
print(f"{a_server_cmd} is stopped", flush=True)
9391

9492

0 commit comments

Comments
 (0)