Author: steve.ebersole(a)jboss.com
Date: 2010-05-21 02:56:48 -0400 (Fri, 21 May 2010)
New Revision: 19580
Modified:
core/trunk/testsuite/src/test/java/org/hibernate/test/sql/hand/query/NativeSQLQueriesTest.java
Log:
account for last H2 failure on core.
Modified:
core/trunk/testsuite/src/test/java/org/hibernate/test/sql/hand/query/NativeSQLQueriesTest.java
===================================================================
---
core/trunk/testsuite/src/test/java/org/hibernate/test/sql/hand/query/NativeSQLQueriesTest.java 2010-05-21
05:34:58 UTC (rev 19579)
+++
core/trunk/testsuite/src/test/java/org/hibernate/test/sql/hand/query/NativeSQLQueriesTest.java 2010-05-21
06:56:48 UTC (rev 19580)
@@ -365,16 +365,26 @@
s = openSession();
t = s.beginTransaction();
- sqlQuery = s.getNamedQuery("organizationreturnproperty");
- sqlQuery.setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP);
+ sqlQuery = s.getNamedQuery( "organizationreturnproperty" );
+ sqlQuery.setResultTransformer( Transformers.ALIAS_TO_ENTITY_MAP );
list = sqlQuery.list();
- assertEquals(2,list.size() );
+ assertEquals( 2,list.size() );
m = (Map) list.get(0);
- assertTrue(m.containsKey("org"));
- assertClassAssignability(m.get("org").getClass(), Organization.class);
- assertTrue(m.containsKey("emp"));
- assertClassAssignability(m.get("emp").getClass(), Employment.class);
- assertEquals(2, m.size());
+ assertEquals( 2, m.size() );
+ assertTrue( m.containsKey("org") );
+ assertTrue( m.containsKey("emp") );
+ assertClassAssignability( m.get("org").getClass(), Organization.class );
+ if ( jboss.getId() == ( (Organization) m.get("org") ).getId() ) {
+ assertClassAssignability( m.get("emp").getClass(), Employment.class );
+ }
+ Map m2 = (Map) list.get(1);
+ assertEquals( 2, m.size() );
+ assertTrue( m2.containsKey("org") );
+ assertTrue( m2.containsKey("emp") );
+ assertClassAssignability( m2.get("org").getClass(), Organization.class );
+ if ( jboss.getId() == ( (Organization) m2.get("org") ).getId() ) {
+ assertClassAssignability( m2.get("emp").getClass(), Employment.class );
+ }
t.commit();
s.close();
Show replies by date