test: run the DASH merge tests without ffprobe and wait for the drain to end

This commit is contained in:
imSp4rky
2026-11-24 20:10:46 -07:00
parent 6221b17ba3
commit 65e9d1a8c5
2 changed files with 8 additions and 1 deletions
+7
View File
@@ -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 hls as hls_module
from unshackle.core.manifests import segment_pipeline from unshackle.core.manifests import segment_pipeline
from unshackle.core.manifests.ism_init import PIFF_SENC_UUID 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 from unshackle.core.tracks.track import DownloadContext
INIT = bytes(range(100)) INIT = bytes(range(100))
@@ -60,6 +61,12 @@ class _Handler(BaseHTTPRequestHandler):
pass 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 @pytest.fixture
def server(): def server():
srv = ThreadingHTTPServer(("127.0.0.1", 0), _Handler) srv = ThreadingHTTPServer(("127.0.0.1", 0), _Handler)
+1 -1
View File
@@ -335,7 +335,7 @@ def test_the_session_channel_carries_what_the_server_starts(
assert service.server_draining() assert service.server_draining()
server.loop.call_soon_threadsafe(store.stop_drain) server.loop.call_soon_threadsafe(store.stop_drain)
assert wait_until(lambda: not store.draining, 5) 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 assert count(server, "GET", PROMPT_ROUTE) == count(server, "GET", LOGS_ROUTE) == 0
finally: finally:
release.set() release.set()