Taragolis commented on PR #28248:
URL: https://github.com/apache/airflow/pull/28248#issuecomment-1344013229
Just a thought:
- Do we actually need run this in the loop?
- Could we actually run by use the same objects and use `flaky` library
(which actually install as dev dependency) for multiple execution?
- Because each flaky run it is separate test than we actually could decrease
`execution_timeout`
Some scratch implementation
```python
@pytest.mark.quarantined
@pytest.mark.setup_timeout(0)
class TestCeleryHang:
RUNS = 500
@classmethod
def setup_class(cls):
task = MockTask()
num_tasks = 26
cls.executor = celery_executor.CeleryExecutor()
cls.task_tuples_to_send = [(None, None, None, task) for _ in
range(num_tasks)]
cls.expected = [(None, None, 1) for _ in range(num_tasks)]
@pytest.mark.flaky(max_runs=RUNS, min_passes=RUNS)
@pytest.mark.execution_timeout(5)
def test_send_tasks_to_celery_hang(self, register_signals):
"""
Test that celery_executor does not hang after many runs.
"""
assert self.executor._send_tasks_to_celery(self.task_tuples_to_send)
== self.expected
```
WDYT?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]