generated from john/python-template
This commit is contained in:
@@ -176,10 +176,10 @@ class TestJobService:
|
||||
claimed = await job_service.claim_next_queued_job()
|
||||
return claimed.id if claimed is not None else None
|
||||
|
||||
first_claim, second_claim = await asyncio.gather(claim_once(), claim_once())
|
||||
claim_results = await asyncio.gather(*(claim_once() for _ in range(8)))
|
||||
|
||||
assert [first_claim, second_claim].count(queued_job.id) == 1
|
||||
assert [first_claim, second_claim].count(None) == 1
|
||||
assert claim_results.count(queued_job.id) == 1
|
||||
assert claim_results.count(None) == 7
|
||||
assert await job_service.claim_next_queued_job() is None
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
||||
Reference in New Issue
Block a user