Release SyncVito 1.0.12
This commit is contained in:
1 parent
ccb89191b5
commit
786e3ae9b3
8 files changed
+144
-8
No files matched your search
@@ -73,6 +73,30 @@ def test_retry_queues_all_ready_tasks(coordinator: SyncCoordinator, monkeypatch:
|
||||
monkeypatch.setattr(coordinator, "enqueue", queued.append)
|
||||
coordinator._check_retries()
|
||||
assert queued == ["first", "second"]
|
||||
assert "first" not in coordinator._retry_tasks
|
||||
assert "second" not in coordinator._retry_tasks
|
||||
|
||||
|
||||
def test_task_with_only_errors_is_not_queued_for_auto_retry(
|
||||
coordinator: SyncCoordinator, monkeypatch: pytest.MonkeyPatch
|
||||
) -> None:
|
||||
task = coordinator.config.tasks[0]
|
||||
coordinator._on_finished(task.id, SyncResult(errors=["Zugriff verweigert"]))
|
||||
assert task.id not in coordinator._retry_tasks
|
||||
queued = []
|
||||
monkeypatch.setattr(coordinator, "enqueue", queued.append)
|
||||
coordinator._check_retries()
|
||||
assert queued == []
|
||||
|
||||
|
||||
def test_retry_max_attempts_cap(coordinator: SyncCoordinator, monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
task = coordinator.config.tasks[0]
|
||||
coordinator._retry_tasks[task.id] = []
|
||||
coordinator._retry_attempts[task.id] = 5
|
||||
queued = []
|
||||
monkeypatch.setattr(coordinator, "enqueue", queued.append)
|
||||
coordinator._check_retries()
|
||||
assert queued == []
|
||||
|
||||
|
||||
def test_start_resets_stale_progress_before_worker_starts(
|
||||
|
||||
Reference in new issue
Block a user