[hibernate-commits] Hibernate SVN: r15734 - core/trunk/testsuite/src/test/java/org/hibernate/test/stats.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Fri Dec 26 18:57:29 EST 2008


Author: gbadner
Date: 2008-12-26 18:57:29 -0500 (Fri, 26 Dec 2008)
New Revision: 15734

Modified:
   core/trunk/testsuite/src/test/java/org/hibernate/test/stats/StatsTest.java
Log:
HHH-3675 - Limitations on Sybase ResultSet implementation cause unit test failures


Modified: core/trunk/testsuite/src/test/java/org/hibernate/test/stats/StatsTest.java
===================================================================
--- core/trunk/testsuite/src/test/java/org/hibernate/test/stats/StatsTest.java	2008-12-26 23:53:27 UTC (rev 15733)
+++ core/trunk/testsuite/src/test/java/org/hibernate/test/stats/StatsTest.java	2008-12-26 23:57:29 UTC (rev 15734)
@@ -1,4 +1,4 @@
-//$Id: StatsTest.java 10977 2006-12-12 23:28:04Z steve.ebersole at jboss.com $
+//$Id: StatsTest.java 15731 2008-12-26 23:42:56Z gbadner $
 package org.hibernate.test.stats;
 
 import java.util.HashSet;
@@ -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();




More information about the hibernate-commits mailing list