ffinfo commented on a change in pull request #4396: [AIRFLOW-3585] - Add edges 
to database
URL: https://github.com/apache/airflow/pull/4396#discussion_r257422882
 
 

 ##########
 File path: tests/core.py
 ##########
 @@ -166,6 +176,7 @@ def test_schedule_dag_relativedelta(self):
             task_id="faketastic",
             owner='Also fake',
             start_date=datetime(2015, 1, 2, 0, 0)))
+        dag.sync_to_db()
 
 Review comment:
   This is because a lot of tests are working to a specific state of the 
database. Because I'm now actively using the DagModel table in the 
`create_dagrun()` method is was needed to add to the database in a lot of 
places. This was mainly trial and error on travis, adding it to tests that does 
fail inside `create_dagrun()`.
   
   Doing `sync_do_db()` is a lot easier then manual adding all of the DagModel 
records for each test.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to