clear stats before running to ensure accurate test results
This commit is contained in:
parent
7058cb048f
commit
05f9bdcbb0
|
@ -85,6 +85,7 @@ public class LazyKeyManyToOneTest extends BaseCoreFunctionalTestCase {
|
||||||
Customer cust = new Customer( "Acme, Inc." );
|
Customer cust = new Customer( "Acme, Inc." );
|
||||||
Order order = new Order( new Order.Id( cust, 1 ) );
|
Order order = new Order( new Order.Id( cust, 1 ) );
|
||||||
cust.getOrders().add( order );
|
cust.getOrders().add( order );
|
||||||
|
sessionFactory().getStatistics().clear();
|
||||||
s.save( cust );
|
s.save( cust );
|
||||||
s.flush();
|
s.flush();
|
||||||
assertEquals( 2, sessionFactory().getStatistics().getEntityInsertCount() );
|
assertEquals( 2, sessionFactory().getStatistics().getEntityInsertCount() );
|
||||||
|
|
|
@ -58,6 +58,7 @@ public class KeyManyToOneTest extends BaseCoreFunctionalTestCase {
|
||||||
Customer cust = new Customer( "Acme, Inc." );
|
Customer cust = new Customer( "Acme, Inc." );
|
||||||
Order order = new Order( cust, 1 );
|
Order order = new Order( cust, 1 );
|
||||||
cust.getOrders().add( order );
|
cust.getOrders().add( order );
|
||||||
|
sessionFactory().getStatistics().clear();
|
||||||
s.save( cust );
|
s.save( cust );
|
||||||
s.flush();
|
s.flush();
|
||||||
assertEquals( 2, sessionFactory().getStatistics().getEntityInsertCount() );
|
assertEquals( 2, sessionFactory().getStatistics().getEntityInsertCount() );
|
||||||
|
|
Loading…
Reference in New Issue