mirror of
https://github.com/wassname/optuna-dashboard.git
synced 2026-09-13 12:50:51 +08:00
Clear inmemory chache when terminating test
This commit is contained in:
@@ -8,6 +8,8 @@ import optuna
|
||||
from optuna_dashboard import wsgi
|
||||
import pytest
|
||||
|
||||
from .utils import clear_inmemory_cache
|
||||
|
||||
|
||||
def get_free_port() -> int:
|
||||
tcp = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
@@ -28,6 +30,7 @@ def make_test_server(
|
||||
thread.start()
|
||||
|
||||
def stop_server() -> None:
|
||||
clear_inmemory_cache()
|
||||
httpd.shutdown()
|
||||
httpd.server_close()
|
||||
thread.join()
|
||||
|
||||
Reference in New Issue
Block a user