mistercrunch commented on code in PR #30394:
URL: https://github.com/apache/superset/pull/30394#discussion_r1776100018


##########
tests/integration_tests/conftest.py:
##########
@@ -43,6 +43,15 @@
 ADMIN_SCHEMA_NAME = "admin_database"
 
 
+# When running tests it's important to disable autoflush to prevent dirty 
reads. If a
+# command modifies the database but doesn't explicitly commit the transaction, 
a
+# subsequent read won't see the data because we use READ COMMITTED isolation 
level. But
+# many integration tests write and read in the same session, and because by 
default
+# SQLAlchemy uses autoflush, the test would see data that in real world 
wouldn't be
+# there.
+db.session.configure(autoflush=False)

Review Comment:
   just that one question, otherwise PR LGTM



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to