potiuk commented on PR #41067:
URL: https://github.com/apache/airflow/pull/41067#issuecomment-2263594657

   > I think there is another one, I am looking into it but you'll probably be 
faster than me. I think there is something off in is_called_from_test_code, 
some sessions are created in tests but is_called_from_test_code returns False:
   
   Yes. The detection of the test code vs "tested" code is somewhat imperfect 
and arbitrary - we simply guess that given code is called as test 
setup/teardown. In many cases it is good (fixtures, calling operator "run" 
command. But some tests might indeed run directly a db calls to setup something 
before or cleanup after.
   
   I wonder if we should maybe change the strategy  here and possibly rather 
than try to run "all tests" in isolation mode, maybe we should just run a 
select subset of them. But it would be a bit difficult to choose the right 
subset. 
   
   WDYT? 
   
   For now excluding those tests from db_isolation is easiest 


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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to