clear stats before running to ensure accurate test results

This commit is contained in:
David Mansfield 2011-03-29 16:08:39 -04:00 committed by Steve Ebersole
parent 7058cb048f
commit 05f9bdcbb0
2 changed files with 2 additions and 0 deletions

View File

@ -85,6 +85,7 @@ public class LazyKeyManyToOneTest extends BaseCoreFunctionalTestCase {
Customer cust = new Customer( "Acme, Inc." );
Order order = new Order( new Order.Id( cust, 1 ) );
cust.getOrders().add( order );
sessionFactory().getStatistics().clear();
s.save( cust );
s.flush();
assertEquals( 2, sessionFactory().getStatistics().getEntityInsertCount() );

View File

@ -58,6 +58,7 @@ public class KeyManyToOneTest extends BaseCoreFunctionalTestCase {
Customer cust = new Customer( "Acme, Inc." );
Order order = new Order( cust, 1 );
cust.getOrders().add( order );
sessionFactory().getStatistics().clear();
s.save( cust );
s.flush();
assertEquals( 2, sessionFactory().getStatistics().getEntityInsertCount() );