fix(platform-fulfillment): 释放空闲连接并合并选号请求
This commit is contained in:
@@ -1042,6 +1042,22 @@ class TestSnapshotSync(_Base):
|
||||
|
||||
|
||||
class TestAccountSelection(_Base):
|
||||
def test_manual_allocation_request_only_marks_task_due(self):
|
||||
task = self.task()
|
||||
old_retry_at = task.next_allocate_at
|
||||
|
||||
detail = service.prepare_manual_allocation(
|
||||
self.session,
|
||||
task_id=task.id,
|
||||
current=self.admin,
|
||||
)
|
||||
|
||||
self.session.refresh(task)
|
||||
assert detail["task"]["account"] is None
|
||||
assert task.next_allocate_at is not None
|
||||
assert old_retry_at is None or task.next_allocate_at >= old_retry_at
|
||||
self.refresh_mock.assert_not_called()
|
||||
|
||||
def test_capability_match_checks_only_selected_candidate(self, monkeypatch):
|
||||
account = self.account("capability-fast")
|
||||
task = self.task()
|
||||
|
||||
Reference in New Issue
Block a user