[ 
https://issues.apache.org/jira/browse/AIRFLOW-3226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16654059#comment-16654059
 ] 

Ash Berlin-Taylor commented on AIRFLOW-3226:
--------------------------------------------

The run_unit_tests.sh does a {{airflow resetdb}} so each run gets a fresh DB 
that way.

It would be better to have each test clear up after itself.

 

(Better yet, and on my long term plan, but masses more work) would be to have 
each test run in a transaction where we can and just roll back at the end! This 
wouldn't work for all tests, but would cover some of the simpler tests)

> Airflow DAGRun tests require a db reset between runs
> ----------------------------------------------------
>
>                 Key: AIRFLOW-3226
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-3226
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: tests
>    Affects Versions: 1.10.0
>            Reporter: James Meickle
>            Priority: Minor
>
> The Airflow DAGRun tests create DAG runs in the sqlite test database. These 
> runs have unique constraints on dag_id and execution_date/run_id. Since there 
> is no random factor to these in the tests, they only succeed on the first run.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to