From: <hib...@li...> - 2006-06-06 20:45:55
|
Author: ste...@jb... Date: 2006-06-06 16:45:22 -0400 (Tue, 06 Jun 2006) New Revision: 9991 Modified: trunk/Hibernate3/test/org/hibernate/test/hql/ASTParserLoadingTest.java Log: add ordering to query to avoid test assertion sensitivity on db-dependent return order Modified: trunk/Hibernate3/test/org/hibernate/test/hql/ASTParserLoadingTest.java =================================================================== --- trunk/Hibernate3/test/org/hibernate/test/hql/ASTParserLoadingTest.java 2006-06-06 18:08:00 UTC (rev 9990) +++ trunk/Hibernate3/test/org/hibernate/test/hql/ASTParserLoadingTest.java 2006-06-06 20:45:22 UTC (rev 9991) @@ -1278,9 +1278,9 @@ session = openSession(); - results = session.createQuery( "select a from Animal a, Animal b" ) - .setResultTransformer(new DistinctRootEntityResultTransformer()) - .list(); + results = session.createQuery( "select a from Animal a, Animal b order by a.id" ) + .setResultTransformer(new DistinctRootEntityResultTransformer()) + .list(); assertEquals( "Incorrect result size", 2, results.size()); assertTrue( "Incorrect return type", results.get(0) instanceof Animal ); firstAnimal = (Animal) results.get(0); |