File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030- [x] 07-02-PLAN.md — Security: centralize check_code in JobExecutor
3131- [x] 07-03-PLAN.md — Pool/Engine: release leak, start timeout, acquire race, workspace API
3232- [x] 07-04-PLAN.md — Jobs/Session: state machine guards, TOCTOU, background task tracking
33- - [ ] 07-05-PLAN.md — Server/Config: deprecations, dead attrs, YAML errors, CORS
33+ - [x ] 07-05-PLAN.md — Server/Config: deprecations, dead attrs, YAML errors, CORS
3434- [x] 07-06-PLAN.md — Monitoring: SQL limits, query clamping, path traversal, route dedup
35- - [ ] 07-07-PLAN.md — Tests: async conversion, shared fixtures, scale-down coverage, assertions
35+ - [x ] 07-07-PLAN.md — Tests: async conversion, shared fixtures, scale-down coverage, assertions
Original file line number Diff line number Diff line change @@ -771,8 +771,10 @@ async def test_completed_task_removed_from_set(self) -> None:
771771 )
772772 await executor .execute ("s1" , "x = 1;" )
773773
774- # Wait for the background task to complete
775- await asyncio .sleep (0.5 )
774+ # Wait for the background task to complete (event-based, not sleep)
775+ deadline = asyncio .get_event_loop ().time () + 5.0
776+ while len (executor ._background_tasks ) > 0 and asyncio .get_event_loop ().time () < deadline :
777+ await asyncio .sleep (0.05 )
776778
777779 # Done callback should have removed the task
778780 assert len (executor ._background_tasks ) == 0
You can’t perform that action at this time.
0 commit comments