HHH-3675 - Limitations on Sybase ResultSet implementation causes unit test failures
git-svn-id: https://svn.jboss.org/repos/hibernate/core/branches/Branch_3_2@15724 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
fdc420edeb
commit
8a6842cc11
|
@ -107,6 +107,10 @@ public class AggressiveReleaseTest extends ConnectionManagementTestCase {
|
||||||
// expected behavior
|
// expected behavior
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// getting the first row only because Sybase throws NullPointerException
|
||||||
|
// if data is not read before closing the ResultSet
|
||||||
|
sr.next();
|
||||||
|
|
||||||
// Closing the ScrollableResults does currently force the batcher to
|
// Closing the ScrollableResults does currently force the batcher to
|
||||||
// aggressively release the connection
|
// aggressively release the connection
|
||||||
sr.close();
|
sr.close();
|
||||||
|
|
|
@ -443,17 +443,18 @@ public class CMTTest extends FunctionalTestCase {
|
||||||
DummyTransactionManager.INSTANCE.begin();
|
DummyTransactionManager.INSTANCE.begin();
|
||||||
s = getSessions().getCurrentSession();
|
s = getSessions().getCurrentSession();
|
||||||
results = s.createQuery( "from Item" ).scroll();
|
results = s.createQuery( "from Item" ).scroll();
|
||||||
while ( !results.isLast() ) {
|
while ( results.next() ) {
|
||||||
results.next();
|
// do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
DummyTransactionManager.INSTANCE.getTransaction().commit();
|
DummyTransactionManager.INSTANCE.getTransaction().commit();
|
||||||
|
|
||||||
// Next, scroll the entire result (closing)
|
// Next, scroll the entire result (closing)
|
||||||
DummyTransactionManager.INSTANCE.begin();
|
DummyTransactionManager.INSTANCE.begin();
|
||||||
s = getSessions().getCurrentSession();
|
s = getSessions().getCurrentSession();
|
||||||
results = s.createQuery( "from Item" ).scroll();
|
results = s.createQuery( "from Item" ).scroll();
|
||||||
while ( !results.isLast() ) {
|
while ( results.next() ) {
|
||||||
results.next();
|
// do nothing
|
||||||
}
|
}
|
||||||
results.close();
|
results.close();
|
||||||
DummyTransactionManager.INSTANCE.getTransaction().commit();
|
DummyTransactionManager.INSTANCE.getTransaction().commit();
|
||||||
|
|
Loading…
Reference in New Issue