Author: jcosta(a)redhat.com
Date: 2009-06-05 08:09:49 -0400 (Fri, 05 Jun 2009)
New Revision: 16701
Modified:
core/trunk/testsuite/src/test/java/org/hibernate/test/legacy/FooBarTest.java
Log:
HHH-3946 - Added missing 'open transactions' and fixed the assertion failure.
Modified: core/trunk/testsuite/src/test/java/org/hibernate/test/legacy/FooBarTest.java
===================================================================
---
core/trunk/testsuite/src/test/java/org/hibernate/test/legacy/FooBarTest.java 2009-06-05
11:57:40 UTC (rev 16700)
+++
core/trunk/testsuite/src/test/java/org/hibernate/test/legacy/FooBarTest.java 2009-06-05
12:09:49 UTC (rev 16701)
@@ -3966,6 +3966,7 @@
s.disconnect();
s.reconnect();
+ s.beginTransaction();
s.delete(foo);
foo2.setFoo(null);
s.getTransaction().commit();
@@ -3973,6 +3974,7 @@
s.disconnect();
s.reconnect();
+ s.beginTransaction();
s.delete(foo2);
s.getTransaction().commit();
s.close();
@@ -4025,17 +4027,18 @@
List results = s.createQuery( "SELECT one FROM " + One.class.getName() +
" one ORDER BY one.value ASC" ).list();
assertEquals( 2, results.size() );
assertEquals( "'a' isn't first element", "a", ( (One)
results.get(0) ).getValue() );
- assertEquals( "'b' isn't second element", "b", ( (One)
results.get(2) ).getValue() );
+ assertEquals( "'b' isn't second element", "b", ( (One)
results.get(1) ).getValue() );
s.getTransaction().commit();
s.close();
s = openSession();
+ s.beginTransaction();
results = s.createQuery( "SELECT many.one FROM " + Many.class.getName() +
" many ORDER BY many.one.value ASC, many.one.id" )
.list();
assertEquals( 2, results.size() );
assertEquals( 2, results.size() );
assertEquals( "'a' isn't first element", "a", ( (One)
results.get(0) ).getValue() );
- assertEquals( "'b' isn't second element", "b", ( (One)
results.get(2) ).getValue() );
+ assertEquals( "'b' isn't second element", "b", ( (One)
results.get(1) ).getValue() );
s.getTransaction().commit();
s.close();
@@ -4248,6 +4251,7 @@
s.getTransaction().commit();
s.close();
s = openSession();
+ s.beginTransaction();
s.update(v, id);
s.update(v, id);
s.delete(v);