Skip to content

Commit

Permalink
Shutdown httpd before destructing HTTPServer objects (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
xuhdev committed Jan 6, 2021
1 parent 28d5e13 commit 01dda12
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def local_http_server() -> HTTPServer:
# Start a new thread, because httpd.serve_forever is blocking
threading.Thread(target=httpd.serve_forever, name='Local Http Server', daemon=True).start()
yield httpd
httpd.shutdown()


@pytest.fixture(scope='session')
Expand Down Expand Up @@ -119,6 +120,7 @@ def local_https_server() -> HTTPServer:
# Start a new thread, because httpd.serve_forever is blocking
threading.Thread(target=httpd.serve_forever, name='Local Https Server', daemon=True).start()
yield httpd
httpd.shutdown()


@pytest.fixture(scope='session')
Expand Down

0 comments on commit 01dda12

Please sign in to comment.