fix: add HTTP readiness check to wait_for_server and remove dead code in SSE tests (#2073)
This commit is contained in:
parent
2fe56e56de
commit
3b53fb9a00
2 changed files with 0 additions and 17 deletions
|
|
@ -1,7 +1,6 @@
|
|||
import json
|
||||
import multiprocessing
|
||||
import socket
|
||||
import time
|
||||
from collections.abc import AsyncGenerator, Generator
|
||||
from typing import Any
|
||||
from unittest.mock import AsyncMock, MagicMock, Mock, patch
|
||||
|
|
@ -134,11 +133,6 @@ def run_server(server_port: int) -> None: # pragma: no cover
|
|||
print(f"starting server on {server_port}")
|
||||
server.run()
|
||||
|
||||
# Give server time to start
|
||||
while not server.started:
|
||||
print("waiting for server to start")
|
||||
time.sleep(0.5)
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def server(server_port: int) -> Generator[None, None, None]:
|
||||
|
|
@ -313,11 +307,6 @@ def run_mounted_server(server_port: int) -> None: # pragma: no cover
|
|||
print(f"starting server on {server_port}")
|
||||
server.run()
|
||||
|
||||
# Give server time to start
|
||||
while not server.started:
|
||||
print("waiting for server to start")
|
||||
time.sleep(0.5)
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def mounted_server(server_port: int) -> Generator[None, None, None]:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import multiprocessing
|
||||
import socket
|
||||
import time
|
||||
from collections.abc import AsyncGenerator, Generator
|
||||
from urllib.parse import urlparse
|
||||
|
||||
|
|
@ -114,11 +113,6 @@ def run_server(server_port: int) -> None: # pragma: no cover
|
|||
print(f"starting server on {server_port}")
|
||||
server.run()
|
||||
|
||||
# Give server time to start
|
||||
while not server.started:
|
||||
print("waiting for server to start")
|
||||
time.sleep(0.5)
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def server(server_port: int) -> Generator[None, None, None]:
|
||||
|
|
|
|||
Loading…
Reference in a new issue