jscheffl commented on code in PR #41296:
URL: https://github.com/apache/airflow/pull/41296#discussion_r1706163416
##########
tests/models/test_taskinstance.py:
##########
@@ -1528,7 +1534,12 @@ def do_something_else(i):
dep_context=DepContext(flag_upstream_failed=flag_upstream_failed),
session=session,
)
+ if is_db_isolation_mode():
+ TracebackSessionForTests.set_allow_db_access(session, True)
completed = all(dep.passed for dep in dep_results)
+ if is_db_isolation_mode():
+ TracebackSessionForTests.set_allow_db_access(session, False)
Review Comment:
You can save the `if` as the TraceBackSessionForTest checks this internally.
```suggestion
TracebackSessionForTests.set_allow_db_access(session, True)
completed = all(dep.passed for dep in dep_results)
TracebackSessionForTests.set_allow_db_access(session, False)
```
--
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]