From 65e9d1a8c54c9bf92cc58e528403f30fb7d982f2 Mon Sep 17 00:00:00 2001 From: imSp4rky Date: Tue, 24 Nov 2026 20:10:46 -0700 Subject: [PATCH] test: run the DASH merge tests without ffprobe and wait for the drain to end --- tests/core/test_rolling_merge_hls_ism.py | 7 +++++++ tests/remote/unit/test_remote_loopback.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/core/test_rolling_merge_hls_ism.py b/tests/core/test_rolling_merge_hls_ism.py index 51cf3ab2..49235596 100644 --- a/tests/core/test_rolling_merge_hls_ism.py +++ b/tests/core/test_rolling_merge_hls_ism.py @@ -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) diff --git a/tests/remote/unit/test_remote_loopback.py b/tests/remote/unit/test_remote_loopback.py index a9969e2d..19cbe882 100644 --- a/tests/remote/unit/test_remote_loopback.py +++ b/tests/remote/unit/test_remote_loopback.py @@ -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()