potiuk commented on PR #45704: URL: https://github.com/apache/airflow/pull/45704#issuecomment-2595200236
> Out of interest how long does this new test take? It's possible we could add this to the existing `tests/serialization/test_dag_serialization.py::TestStringifiedDAGs::test_serialization` test which loads all example dags. This particular test takes less than few seconds or so when run for the whole test module. But this is because - if you look above - there are two earliert tests like that already - > whether example_dags are importable (this is run first) and whether there are no DB calls (second), and the first one takes all the bulk time of importing all the classes from all the providers - the DB and now the "get_connection" test are of course order of magnitude faster after all those tests are run. I think all of the tests takes 60s or so - including first time DB intialization. We could potentially combine all those tests together as a (slight) optimisation, but I think that would be at a huge expense of concern separation. It's a bit cumbersome, counter-intuitive and confusing to test "importability" "db access" and "get_connection" access in dag serialization and vice-versa. So I think it's better to leave them separate even if they are slightly "slower". -- 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: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org