From: <pa...@us...> - 2011-02-28 05:14:37
|
Revision: 5406 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5406&view=rev Author: patearl Date: 2011-02-28 05:14:31 +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-28 01:05:25 UTC (rev 5405) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/BasicClassFixture.cs 2011-02-28 05:14:31 UTC (rev 5406) @@ -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,7 @@ Assert.AreEqual(originalCount + 1, bc.StringBag.Count, "was refreshed correctly"); s.Delete(bc); - t.Commit(); + s.Flush(); s.Close(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |