Commit f447b91
SEP-1735: Switch unused worker_loop_env requests to usefixtures in test_celery_settings_override.py (#1451)
Four tests in `TestWorkerRefresherHandlers` requested the
`worker_loop_env` fixture purely for its setup side effects (dedicated
event loop, in-memory Tasks DB) without ever reading its returned
`(loop, session_maker)` tuple, leaving the module inconsistent with the
sibling suite's `usefixtures` convention for the same intent.
### Changes
- Switched `test_shutdown_cancels_and_drains_started_refresher` and
`test_init_is_idempotent_when_already_running` from a `worker_loop_env`
parameter with a discarded `loop, _ = worker_loop_env` unpack to
`@pytest.mark.usefixtures("worker_loop_env")`
- Switched `test_init_forwards_a_budget_from_worker_proc_alive_timeout`
and `test_init_returns_with_a_running_refresher_when_the_seed_hangs`
from an unused `worker_loop_env: WorkerLoopEnv` parameter to
`@pytest.mark.usefixtures("worker_loop_env")`
- Left `test_post_init_override_visible_after_loop_driven` and
`test_overridden_ttl_excludes_recently_locked_row` unchanged, since both
actually read `loop`/`maker` from the unpacked tuple
```python
@pytest.mark.usefixtures("worker_loop_env")
def test_shutdown_cancels_and_drains_started_refresher(self):
"""Stop and drain the started refresher, clearing the handle."""
start_settings_override_refresher()
...
```
No test assertions or fixture setup/teardown behavior changed — this is
a call-site style change only.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: yyyyyyyan <24644216+yyyyyyyan@users.noreply.github.com>
Co-authored-by: yyyyyyy <yan.orestes@percona.com>1 parent 12aa067 commit f447b91
1 file changed
Lines changed: 6 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | 66 | | |
68 | 67 | | |
69 | 68 | | |
| |||
300 | 299 | | |
301 | 300 | | |
302 | 301 | | |
303 | | - | |
| 302 | + | |
| 303 | + | |
304 | 304 | | |
305 | | - | |
306 | 305 | | |
307 | 306 | | |
308 | 307 | | |
| |||
312 | 311 | | |
313 | 312 | | |
314 | 313 | | |
315 | | - | |
| 314 | + | |
| 315 | + | |
316 | 316 | | |
317 | | - | |
318 | 317 | | |
319 | 318 | | |
320 | 319 | | |
| |||
340 | 339 | | |
341 | 340 | | |
342 | 341 | | |
| 342 | + | |
343 | 343 | | |
344 | 344 | | |
345 | | - | |
346 | 345 | | |
347 | 346 | | |
348 | 347 | | |
| |||
354 | 353 | | |
355 | 354 | | |
356 | 355 | | |
| 356 | + | |
357 | 357 | | |
358 | 358 | | |
359 | | - | |
360 | 359 | | |
361 | 360 | | |
362 | 361 | | |
| |||
0 commit comments