potiuk opened a new issue #17579:
URL: https://github.com/apache/airflow/issues/17579


   Happens to be flaky:
   
   
https://github.com/apache/airflow/pull/17578/checks?check_run_id=3312137736#step:6:4809
   
   ```
     __________________ TestLocalTaskJob.test_mark_success_no_kill 
__________________
     
     self = <tests.jobs.test_local_task_job.TestLocalTaskJob object at 
0x7f3d35d5fef0>
     
         def test_mark_success_no_kill(self):
             """
             Test that ensures that mark_success in the UI doesn't cause
             the task to fail, and that the task exits
             """
             dag = self.dagbag.dags.get('test_mark_success')
             task = dag.get_task('task1')
         
             session = settings.Session()
         
             dag.clear()
             dag.create_dagrun(
                 run_id="test",
                 state=State.RUNNING,
                 execution_date=DEFAULT_DATE,
                 start_date=DEFAULT_DATE,
                 session=session,
             )
             ti = TaskInstance(task=task, execution_date=DEFAULT_DATE)
             ti.refresh_from_db()
             job1 = LocalTaskJob(task_instance=ti, ignore_ti_state=True)
             settings.engine.dispose()
             process = multiprocessing.Process(target=job1.run)
             process.start()
             for _ in range(0, 50):
                 if ti.state == State.RUNNING:
                     break
                 time.sleep(0.1)
                 ti.refresh_from_db()
             assert State.RUNNING == ti.state
             ti.state = State.SUCCESS
             session.merge(ti)
             session.commit()
             process.join(timeout=10)
             ti.refresh_from_db()
     >       assert State.SUCCESS == ti.state
     E       AssertionError: assert <TaskInstance...SS: 'success'> == 'running'
     E         - running
     E         + success
     
     tests/jobs/test_local_task_job.py:311: AssertionError
   ```


-- 
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]


Reply via email to