Author: gbadner
Date: 2008-12-26 18:48:07 -0500 (Fri, 26 Dec 2008)
New Revision: 15732
Modified:
core/branches/Branch_3_2/test/org/hibernate/test/stats/StatsTest.java
Log:
HHH-3675 - Limitations on Sybase ResultSet implementation cause unit test failures
Modified: core/branches/Branch_3_2/test/org/hibernate/test/stats/StatsTest.java
===================================================================
--- core/branches/Branch_3_2/test/org/hibernate/test/stats/StatsTest.java 2008-12-26
23:42:56 UTC (rev 15731)
+++ core/branches/Branch_3_2/test/org/hibernate/test/stats/StatsTest.java 2008-12-26
23:48:07 UTC (rev 15732)
@@ -165,6 +165,11 @@
// same deal with scroll()...
assertEquals( "unexpected execution count", 3,
continentStats.getExecutionCount() );
assertEquals( "unexpected row count", results,
continentStats.getExecutionRowCount() );
+ // scroll through data because Sybase throws NullPointerException
+ // if data is not read before closing the ResultSet
+ while ( scrollableResults.next() ) {
+ // do nothing
+ }
scrollableResults.close();
tx.commit();
s.close();