docstr: Test that ensures that mark_success in the UI doesn't cause
  the task to fail, and that the task exits
docstr_tok: ["Test","that","ensures","that","mark_success","in","the","UI","does","n't","cause","the","task","to","fail",",","and","that","the","task","exits"]
code: def test_mark_success_no_kill(self, caplog, get_test_dag, session):
      """
      Test that ensures that mark_success in the UI doesn't cause
      the task to fail, and that the task exits
      """
      dag = get_test_dag("test_mark_state")
      dr = dag.create_dagrun(
          state=State.RUNNING,
          execution_date=DEFAULT_DATE,
          run_type=DagRunType.SCHEDULED,
          session=session,
      )
      task = dag.get_task(task_id="test_mark_success_no_kill")
  
      ti = dr.get_task_instance(task.task_id)
      ti.refresh_from_task(task)
  
      job1 = Job(dag_id=ti.dag_id)
      job_runner = LocalTaskJobRunner(
          job=job1, task_instance=ti, ignore_ti_state=True
      )
  
      with timeout(30):
          run_job(job=job1, execute_callable=job_runner._execute)
      ti.refresh_from_db()
      assert State.SUCCESS == ti.state
      assert (
          "State of this instance has been externally set to success. Terminating instance."
          in caplog.text
      )
  
imports: from __future__ import annotations
  import datetime
  import logging
  import multiprocessing
  import os
  import re
  import signal
  import threading
  import time
  import uuid
  import warnings
  from unittest import mock
  from unittest.mock import patch
  import psutil
  import pytest
  from airflow import settings
  from airflow.exceptions import AirflowException
  from airflow.executors.sequential_executor import SequentialExecutor
  from airflow.jobs.job import Job, run_job
  from airflow.jobs.local_task_job_runner import SIGSEGV_MESSAGE, LocalTaskJobRunner
  from airflow.jobs.scheduler_job_runner import SchedulerJobRunner
  from airflow.models.dag import DAG
  from airflow.models.dagbag import DagBag
  from airflow.models.serialized_dag import SerializedDagModel
  from airflow.models.taskinstance import TaskInstance
  from airflow.operators.empty import EmptyOperator
  from airflow.operators.python import PythonOperator
  from airflow.task.task_runner.standard_task_runner import StandardTaskRunner
  from airflow.utils import timezone
  from airflow.utils.net import get_hostname
  from airflow.utils.session import create_session
  from airflow.utils.state import State
  from airflow.utils.timeout import timeout
  from airflow.utils.types import DagRunType
  from tests.test_utils import db
  from tests.test_utils.asserts import assert_queries_count
  from tests.test_utils.config import conf_vars
  from tests.test_utils.mock_executor import MockExecutor
label_desc: Use image node_id 8 for calling the TestLocalTaskJob obj's underlying member method code with example usage: obj.test_mark_success_no_kill(caplog, get_test_dag, session) without return types