You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/05/14 14:18:31 UTC

[GitHub] [airflow] ashb commented on a change in pull request #8871: Don't use ProcessorAgent to test ProcessorManager

ashb commented on a change in pull request #8871:
URL: https://github.com/apache/airflow/pull/8871#discussion_r425173106



##########
File path: tests/utils/test_dag_processing.py
##########
@@ -149,10 +168,11 @@ def test_find_zombies(self):
             ti = TI(task, DEFAULT_DATE, State.RUNNING)
             local_job = LJ(ti)
             local_job.state = State.SHUTDOWN
-            local_job.id = 1
-            ti.job_id = local_job.id
 
             session.add(local_job)
+            session.commit()
+
+            ti.job_id = local_job.id

Review comment:
       This change is _somewhat_ unrelated, I can split it out if people would like.
   
   When re-running individual tests I got a Unique constraint violation on the DB because we aren't using the autoinc PK on the "job" table here.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org