Skip to content

Commit

Permalink
HHH-6223 fix un-isolated test
Browse files Browse the repository at this point in the history
  • Loading branch information
stliu committed May 16, 2011
1 parent eddd14b commit c6207be
Showing 1 changed file with 4 additions and 3 deletions.
Expand Up @@ -158,6 +158,9 @@ public void testImportQueryFromMappedSuperclass() {
}

public void testSQLQueryWithManyToOne() {
Statistics stats = getSessions().getStatistics();
stats.clear();
stats.setStatisticsEnabled( true );
Night n = new Night();
Calendar c = new GregorianCalendar();
c.set( 2000, 2, 2 );
Expand All @@ -179,10 +182,8 @@ public void testSQLQueryWithManyToOne() {
s.close();
s = openSession();
tx = s.beginTransaction();
Statistics stats = getSessions().getStatistics();
stats.setStatisticsEnabled( true );
Query q = s.getNamedQuery( "night&areaCached" );
List result = q.list();
List result = q.setCacheable( true ).list();
assertEquals( 1, result.size() );
assertEquals( 1, stats.getQueryCachePutCount() );
q.list();
Expand Down

0 comments on commit c6207be

Please sign in to comment.