From: Michael D. <mik...@us...> - 2005-01-24 03:45:10
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10598/NHibernate.Test Modified Files: FooBarTest.cs Log Message: updated a test to use ISession.Dispose() instead of ISession.Close() Index: FooBarTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/FooBarTest.cs,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -d -r1.81 -r1.82 *** FooBarTest.cs 17 Jan 2005 03:40:51 -0000 1.81 --- FooBarTest.cs 24 Jan 2005 03:44:48 -0000 1.82 *************** *** 2149,2153 **** g.Name = "glarch"; s.Flush(); ! s.Close(); // grab a version of g that is old and hold onto it until later --- 2149,2154 ---- g.Name = "glarch"; s.Flush(); ! //s.Close(); ! s.Dispose(); // grab a version of g that is old and hold onto it until later *************** *** 2158,2162 **** NHibernateUtil.Initialize( gOld ); Assert.IsTrue( NHibernateUtil.IsInitialized( gOld ), "should be initialized" ); ! sOld.Close(); s = sessions.OpenSession(); --- 2159,2164 ---- NHibernateUtil.Initialize( gOld ); Assert.IsTrue( NHibernateUtil.IsInitialized( gOld ), "should be initialized" ); ! //sOld.Close(); ! sOld.Dispose(); s = sessions.OpenSession(); *************** *** 2171,2175 **** g.Name = "bar"; s.Flush(); ! s.Close(); // now that g has been changed verify that we can't go back and update --- 2173,2178 ---- g.Name = "bar"; s.Flush(); ! //s.Close(); ! s.Dispose(); // now that g has been changed verify that we can't go back and update *************** *** 2182,2191 **** sOld.Update( gOld, gid ); sOld.Flush(); ! sOld.Close(); } catch(Exception e) { Exception exc = e; ! while( e!=null ) { if( exc is StaleObjectStateException ) --- 2185,2195 ---- sOld.Update( gOld, gid ); sOld.Flush(); ! //sOld.Close(); ! sOld.Dispose(); } catch(Exception e) { Exception exc = e; ! while( exc!=null ) { if( exc is StaleObjectStateException ) *************** *** 2213,2217 **** s.Delete(g); s.Flush(); ! s.Close(); } --- 2217,2222 ---- s.Delete(g); s.Flush(); ! //s.Close(); ! s.Dispose(); } |