HHH-6223 fix un-isolated test
This commit is contained in:
parent
eddd14b010
commit
c6207be3b7
|
@ -158,6 +158,9 @@ public class QueryAndSQLTest extends TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testSQLQueryWithManyToOne() {
|
public void testSQLQueryWithManyToOne() {
|
||||||
|
Statistics stats = getSessions().getStatistics();
|
||||||
|
stats.clear();
|
||||||
|
stats.setStatisticsEnabled( true );
|
||||||
Night n = new Night();
|
Night n = new Night();
|
||||||
Calendar c = new GregorianCalendar();
|
Calendar c = new GregorianCalendar();
|
||||||
c.set( 2000, 2, 2 );
|
c.set( 2000, 2, 2 );
|
||||||
|
@ -179,10 +182,8 @@ public class QueryAndSQLTest extends TestCase {
|
||||||
s.close();
|
s.close();
|
||||||
s = openSession();
|
s = openSession();
|
||||||
tx = s.beginTransaction();
|
tx = s.beginTransaction();
|
||||||
Statistics stats = getSessions().getStatistics();
|
|
||||||
stats.setStatisticsEnabled( true );
|
|
||||||
Query q = s.getNamedQuery( "night&areaCached" );
|
Query q = s.getNamedQuery( "night&areaCached" );
|
||||||
List result = q.list();
|
List result = q.setCacheable( true ).list();
|
||||||
assertEquals( 1, result.size() );
|
assertEquals( 1, result.size() );
|
||||||
assertEquals( 1, stats.getQueryCachePutCount() );
|
assertEquals( 1, stats.getQueryCachePutCount() );
|
||||||
q.list();
|
q.list();
|
||||||
|
|
Loading…
Reference in New Issue