Release SyncVito 1.0.9
This commit is contained in:
1 parent
bb5bfda4fe
commit
4efc1efa18
8 files changed
+136
-9
No files matched your search
@@ -73,3 +73,23 @@ def test_retry_queues_all_ready_tasks(coordinator: SyncCoordinator, monkeypatch:
|
||||
monkeypatch.setattr(coordinator, "enqueue", queued.append)
|
||||
coordinator._check_retries()
|
||||
assert queued == ["first", "second"]
|
||||
|
||||
|
||||
def test_start_resets_stale_progress_before_worker_starts(
|
||||
coordinator: SyncCoordinator, monkeypatch: pytest.MonkeyPatch
|
||||
) -> None:
|
||||
from types import SimpleNamespace
|
||||
|
||||
messages = []
|
||||
workers = []
|
||||
coordinator.progress_changed.connect(lambda *entry: messages.append(entry))
|
||||
|
||||
def start(worker) -> None:
|
||||
assert messages and messages[-1][0] == 0
|
||||
assert "AppData" in messages[-1][1]
|
||||
workers.append(worker)
|
||||
|
||||
monkeypatch.setattr(coordinator, "pool", SimpleNamespace(start=start))
|
||||
coordinator.enqueue(coordinator.config.tasks[0].id)
|
||||
assert len(workers) == 1
|
||||
assert coordinator.current_overall_status() == ("active", "Synchronisierung läuft")
|
||||
Reference in new issue
Block a user