Skip to content

Commit adf7b2f

Browse files
committed
chore(django-spanner): disable savepoints and remove legacy can_rollback_tests
1 parent 53f72fb commit adf7b2f

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

  • packages/django-google-spanner/django_spanner

packages/django-google-spanner/django_spanner/features.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
5656
# Spanner does not support SELECTing an arbitrary expression that also
5757
# appears in the GROUP BY clause.
5858
supports_subqueries_in_group_by = False
59-
uses_savepoints = True
60-
can_rollback_tests = False # Spanner savepoints are no-ops; rely on flush.
59+
uses_savepoints = False
6160
supports_aggregate_filter_clause = False
6261
# Spanner does not support expression indexes
6362
# example: CREATE INDEX index_name ON table (LOWER(column_name))
@@ -274,6 +273,15 @@ class DatabaseFeatures(BaseDatabaseFeatures):
274273
if os.environ.get("SPANNER_EMULATOR_HOST", None):
275274
# Some code isn't yet supported by the Spanner emulator.
276275
skip_tests += (
276+
"fixtures_model_package.tests.FixtureTestCase.test_loaddata",
277+
"sessions_tests.tests.CacheDBSessionTests.test_session_asave_does_not_resurrect_session_logged_out_in_other_context",
278+
"sessions_tests.tests.CacheDBSessionTests.test_session_save_does_not_resurrect_session_logged_out_in_other_context",
279+
"sessions_tests.tests.CacheDBSessionWithTimeZoneTests.test_session_asave_does_not_resurrect_session_logged_out_in_other_context",
280+
"sessions_tests.tests.CacheDBSessionWithTimeZoneTests.test_session_save_does_not_resurrect_session_logged_out_in_other_context",
281+
"sessions_tests.tests.CustomDatabaseSessionTests.test_session_asave_does_not_resurrect_session_logged_out_in_other_context",
282+
"sessions_tests.tests.CustomDatabaseSessionTests.test_session_save_does_not_resurrect_session_logged_out_in_other_context",
283+
"sessions_tests.tests.DatabaseSessionTests.test_session_asave_does_not_resurrect_session_logged_out_in_other_context",
284+
"sessions_tests.tests.DatabaseSessionTests.test_session_save_does_not_resurrect_session_logged_out_in_other_context",
277285
# Data Leakage / Test Isolation Issues (Spanner Emulator Limitation)
278286
"model_inheritance.tests.ModelInheritanceDataTests.test_update_query_counts",
279287
"model_inheritance.tests.ModelInheritanceTests.test_create_child_no_update",

0 commit comments

Comments
 (0)