From: <pa...@us...> - 2011-02-28 00:55:53
|
Revision: 5404 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5404&view=rev Author: patearl Date: 2011-02-28 00:55:46 +0000 (Mon, 28 Feb 2011) Log Message: ----------- Improved a test to prevent a deadlock on SQLite. Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/BasicClassFixture.cs Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/BasicClassFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/BasicClassFixture.cs 2011-02-27 12:39:03 UTC (rev 5403) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/BasicClassFixture.cs 2011-02-28 00:55:46 UTC (rev 5404) @@ -705,7 +705,10 @@ originalCount = basicClass.StringBag.Count; ISession s = OpenSession(); - ITransaction t = s.BeginTransaction(); + // There used to be a transaction started on s and commited before the Close(). + // This transaction was removed since it was causing a deadlock with SQLite. + // This is a theoretical improvement as well, since the transaction could + // be in a mode that would prevent non-repeatable reads, hence breaking the test. ISession s2 = OpenSession(); ITransaction t2 = s2.BeginTransaction(); @@ -721,7 +724,6 @@ Assert.AreEqual(originalCount + 1, bc.StringBag.Count, "was refreshed correctly"); s.Delete(bc); - t.Commit(); s.Close(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |