mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-26 19:05:13 +00:00
test: run the DASH merge tests without ffprobe and wait for the drain to end
This commit is contained in:
@@ -32,6 +32,7 @@ from unshackle.core.manifests import dash as dash_module
|
||||
from unshackle.core.manifests import hls as hls_module
|
||||
from unshackle.core.manifests import segment_pipeline
|
||||
from unshackle.core.manifests.ism_init import PIFF_SENC_UUID
|
||||
from unshackle.core.tracks import track as track_module
|
||||
from unshackle.core.tracks.track import DownloadContext
|
||||
|
||||
INIT = bytes(range(100))
|
||||
@@ -60,6 +61,12 @@ class _Handler(BaseHTTPRequestHandler):
|
||||
pass
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def no_ffprobe(monkeypatch):
|
||||
"""The fake init segments hold no stream for FFprobe to read, so the KID probe goes on to the boxes."""
|
||||
monkeypatch.setattr(track_module, "ffprobe", lambda data: {})
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def server():
|
||||
srv = ThreadingHTTPServer(("127.0.0.1", 0), _Handler)
|
||||
|
||||
@@ -335,7 +335,7 @@ def test_the_session_channel_carries_what_the_server_starts(
|
||||
assert service.server_draining()
|
||||
server.loop.call_soon_threadsafe(store.stop_drain)
|
||||
assert wait_until(lambda: not store.draining, 5)
|
||||
assert not service.server_draining()
|
||||
assert wait_until(lambda: not service.server_draining(), 5)
|
||||
assert count(server, "GET", PROMPT_ROUTE) == count(server, "GET", LOGS_ROUTE) == 0
|
||||
finally:
|
||||
release.set()
|
||||
|
||||
Reference in New Issue
Block a user