### Body

We have several tests marked in the code base with `@pytest.mark.quarantined`
It means that the tests are flaky and if fail in CI it does not fail the build.
The goal is to fix the tests and make them stable.

This task is to gather all of them under the same issue instead of dedicated issue per test.

- [x] [TestImpersonation](https://github.com/apache/airflow/blob/bfcae349b88fd959e32bfacd027a5be976fe2132/tests/core/test_impersonation_tests.py#L117)
- [x] [TestImpersonationWithCustomPythonPath](https://github.com/apache/airflow/blob/bfcae349b88fd959e32bfacd027a5be976fe2132/tests/core/test_impersonation_tests.py#L181)
- [x] [test_exception_propagation](https://github.com/apache/airflow/blob/76f81cd4a7433b7eeddb863b2ae6ee59176cf816/tests/jobs/test_local_task_job.py#L772)
- [x] [test_localtaskjob_maintain_heart_rate](https://github.com/apache/airflow/blob/76f81cd4a7433b7eeddb863b2ae6ee59176cf816/tests/jobs/test_local_task_job.py#L402)
- [x] [test_exception_propagation](https://github.com/apache/airflow/blob/4d0fd8ef6adc35f683c7561f05688a65fd7451f4/tests/executors/test_celery_executor.py#L103)
- [x] [test_process_sigterm_works_with_retries](https://github.com/apache/airflow/blob/65010fda091242870a410c65478eae362899763b/tests/jobs/test_local_task_job.py#L770)


### Committer

- [X] I acknowledge that I am a maintainer/committer of the Apache Airflow project.
"""Test that ensures that task runner sets tasks to retry when task runner receive SIGTERM."""
        mp_context = mp.get_context(mp_method)
        
        
        retry_callback_called = mp_context.Value("i", 0)
        task_started = mp_context.Value("i", 0)
        dag_id = f"test_task_runner_sigterm_{mp_method}_{'' if daemon else 'non_'}daemon"
        task_id = "test_on_retry_callback"
        execution_date = DEFAULT_DATE
        run_id = f"test-{execution_date.date().isoformat()}"
        
        proc = mp_context.Process(
            target=self._sigterm_local_task_runner,
            args=(dag_id, task_id, run_id, execution_date, task_started, retry_callback_called),
            name="LocalTaskJob-TestProcess",
            daemon=daemon,
        )
        proc.start()
        try:
            with timeout(10, "Timeout during waiting start LocalTaskJob"):
                while task_started.value == 0:
                    time.sleep(0.2)
            os.kill(proc.pid, signal.SIGTERM)
            with timeout(10, "Timeout during waiting callback"):
                while retry_callback_called.value == 0:
                    time.sleep(0.2)
        finally:
            proc.kill()
        assert retry_callback_called.value == 1