dstandish commented on pull request #13421:
URL: https://github.com/apache/airflow/pull/13421#issuecomment-753430449


   OK @potiuk I fixed the test.
   
   One problem is that our example dags also serve as test dags, so if you add 
another example task (as I did) you might break a test.
   
   The other contributing factor was that the test depended on hardcoded counts 
of the tasks in the dag.
   
   In my resultion I thought about simply excluding my task from the dag (i.e. 
purge it from `dag1.task_dict`).  But task removal isn't really supported so I 
abandoned that.
   
   What I ended up doing is a mild refactor of the test such that the "starting 
states" were controlled in a dictionary and instead of hardcoding state stats, 
I add a helper function to read this from the config.
   
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to