]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Added note for mssql about using snapshot isolation in order to get multiple
authorMichael Trier <mtrier@gmail.com>
Fri, 2 Jan 2009 18:24:49 +0000 (18:24 +0000)
committerMichael Trier <mtrier@gmail.com>
Fri, 2 Jan 2009 18:24:49 +0000 (18:24 +0000)
connection session tests to pass.

README.unittests
test/orm/session.py

index 0051ce6145ff3a4774e456d7b1ea394e7709591b..87f8e20d6cd3c33e525399b59a0a83dc03fd04e1 100644 (file)
@@ -177,3 +177,14 @@ Postgres: When running the tests on postgres, postgres can get slower and
 slower each time you run the tests.  This seems to be related to the constant
 creation/dropping of tables.  Running a "VACUUM FULL" on the database will
 speed it up again.
+
+MSSQL: Tests that involve multiple connections require Snapshot Isolation
+ability implented on the test database in order to prevent deadlocks that will
+occur with record locking isolation. This feature is only available with
+MSSQL 2005 and greater. For example::
+
+    ALTER DATABASE MyDatabase
+    SET ALLOW_SNAPSHOT_ISOLATION ON
+    
+    ALTER DATABASE MyDatabase
+    SET READ_COMMITTED_SNAPSHOT ON
index 6114a0212917d5bcf331dd3cf474f808d6d6a4c3..782688e13cc2676a8b9a9d7a90d208278351da65 100644 (file)
@@ -162,7 +162,6 @@ class SessionTest(_fixtures.FixtureTest):
         assert len(session.query(User).filter_by(name='Johnny').all()) == 0
         session.close()
 
-    @testing.crashes('mssql', 'test causes mssql to hang')
     @testing.requires.independent_connections
     @engines.close_open_connections
     @testing.resolve_artifact_names
@@ -182,7 +181,6 @@ class SessionTest(_fixtures.FixtureTest):
         assert testing.db.connect().execute("select count(1) from users").scalar() == 1
         sess.close()
 
-    @testing.crashes('mssql', 'test causes mssql to hang')
     @testing.requires.independent_connections
     @engines.close_open_connections
     @testing.resolve_artifact_names
@@ -232,7 +230,6 @@ class SessionTest(_fixtures.FixtureTest):
         eq_(q.one(), Address(email_address='foo'))
 
 
-    @testing.crashes('mssql', 'test causes mssql to hang')
     @testing.requires.independent_connections
     @engines.close_open_connections
     @testing.resolve_artifact_names
@@ -391,7 +388,6 @@ class SessionTest(_fixtures.FixtureTest):
         session.commit()
         assert session.connection().execute("select count(1) from users").scalar() == 2
 
-    @testing.crashes('mssql', 'test causes mssql to hang')
     @testing.fails_on('sqlite', 'FIXME: unknown')
     @testing.resolve_artifact_names
     def test_transactions_isolated(self):