### Body

Recently, [this test](https://github.com/apache/airflow/blob/9de301da2a44385f57be5407e80e16ee376f3d39/tests/cli/commands/test_internal_api_command.py#L134-L137) began to failed with timeout error and it has affected all tests in single CI run. As temporary solution this test was marked as `quarantined`.

We should figure out why it happen and try to resolve it.



### Committer

- [X] I acknowledge that I am a maintainer/committer of the Apache Airflow project.
self._check_processes()
        self._clean_pidfiles()
        yield
        self._check_processes(ignore_running=True)
        self._clean_pidfiles()
    def _check_processes(self, ignore_running=False):
        
        
        
        
        exit_code_pgrep_internal_api = subprocess.Popen(["pgrep", "-c", "-f", "airflow internal-api"]).wait()
        exit_code_pgrep_gunicorn = subprocess.Popen(["pgrep", "-c", "-f", "^gunicorn"]).wait()
        if exit_code_pgrep_internal_api != 1 or exit_code_pgrep_gunicorn != 1:
            subprocess.Popen(["ps", "-ax"]).wait()
            if exit_code_pgrep_internal_api != 1:
                subprocess.Popen(["pkill", "-9", "-f", "airflow-internal-api"]).wait()
            if exit_code_pgrep_gunicorn != 1:
                subprocess.Popen(["pkill", "-9", "-f", "^gunicorn"]).wait()
            if not ignore_running:
                raise AssertionError(
                    "Background processes are running that prevent the test from passing successfully."
                )
    def _clean_pidfiles(self):
        pidfile_internal_api = setup_locations("internal-api")[0]
        pidfile_monitor = setup_locations("internal-api-monitor")[0]
        if os.path.exists(pidfile_internal_api):
            os.remove(pidfile_internal_api)
        if os.path.exists(pidfile_monitor):
            os.remove(pidfile_monitor)
    def _wait_pidfile(self, pidfile):