Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion tiering/offload/tests/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,12 @@ def test_live_session_then_season_in_episode_order_then_rest(tmp_path, monkeypat
w.deck = [{"ratingKey": "99"}]
w.sessions = [{"ratingKey": "30"}]
w.run()
assert w.ops("promote") == ["e30", "e50", "e40", "e20", "m99"]
ops = w.ops("promote")
# The live session's promote is a want: it starts on its own thread, outside the limit, so it
# can be recorded just before or just after the queue's first promote. The queue keeps its order.
assert sorted(ops) == ["e20", "e30", "e40", "e50", "m99"]
assert "e30" in w.runner.want_last
assert [o for o in ops if o != "e30"] == ["e50", "e40", "e20", "m99"]


def test_promote_concurrency_cap(tmp_path, monkeypatch):
Expand Down