HHH-7072 correcting test failure
This commit is contained in:
parent
595c78754c
commit
2f293ed46c
|
@ -45,13 +45,14 @@ public class TestBasicOps extends BaseCoreFunctionalTestCase {
|
||||||
public void testLoadAndStore() {
|
public void testLoadAndStore() {
|
||||||
Session s = openSession();
|
Session s = openSession();
|
||||||
s.beginTransaction();
|
s.beginTransaction();
|
||||||
s.save( new Query( new Location( "first", Location.Type.COUNTY ) ) );
|
Query q = new Query( new Location( "first", Location.Type.COUNTY ) );
|
||||||
|
s.save( q );
|
||||||
s.getTransaction().commit();
|
s.getTransaction().commit();
|
||||||
s.close();
|
s.close();
|
||||||
|
|
||||||
s = openSession();
|
s = openSession();
|
||||||
s.beginTransaction();
|
s.beginTransaction();
|
||||||
Query q = (Query) s.get( Query.class, 1L );
|
q = (Query) s.get( Query.class, q.getId() );
|
||||||
assertEquals( 1, q.getIncludedLocations().size() );
|
assertEquals( 1, q.getIncludedLocations().size() );
|
||||||
Location l = q.getIncludedLocations().iterator().next();
|
Location l = q.getIncludedLocations().iterator().next();
|
||||||
assertEquals( Location.Type.COUNTY, l.getType() );
|
assertEquals( Location.Type.COUNTY, l.getType() );
|
||||||
|
@ -93,6 +94,7 @@ public class TestBasicOps extends BaseCoreFunctionalTestCase {
|
||||||
s.beginTransaction();
|
s.beginTransaction();
|
||||||
q = (Query) s.get( Query.class, q.getId() );
|
q = (Query) s.get( Query.class, q.getId() );
|
||||||
assertEquals( 1, q.getIncludedLocations().size() );
|
assertEquals( 1, q.getIncludedLocations().size() );
|
||||||
|
s.delete( q );
|
||||||
s.getTransaction().commit();
|
s.getTransaction().commit();
|
||||||
s.close();
|
s.close();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue