db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r885726 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/DistinctTest.java
Date Tue, 01 Dec 2009 10:55:12 GMT
Author: kahatlen
Date: Tue Dec  1 10:55:12 2009
New Revision: 885726

URL: http://svn.apache.org/viewvc?rev=885726&view=rev
Log:
DERBY-4457: 'Column value mismatch' in 'testDistinctInsertWithGeneratedColumn(...lang.DistinctTest)'
on Jvm 1.5, 1.4, phoneME.

SELECT DISTINCT may return rows in different order on different JVMs. Made the test independent
of the actual ordering.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/DistinctTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/DistinctTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/DistinctTest.java?rev=885726&r1=885725&r2=885726&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/DistinctTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/DistinctTest.java
Tue Dec  1 10:55:12 2009
@@ -457,14 +457,20 @@
 		assertEquals(2, s.executeUpdate("insert into destWithAI(c12) select distinct(c31) from
source"));
 		
 		// we should not see gaps in the autoincrement column
-		String [][] expected = { {"1", "1"}, 
-				                 {"2", "2"} };
-		JDBC.assertFullResultSet(s.executeQuery("select * from destWithAI"), expected);
+		String [][] expected = { {"1"}, {"2"} };
+		JDBC.assertFullResultSet(
+				s.executeQuery("select c11 from destWithAI order by c11"),
+				expected);
+		JDBC.assertFullResultSet(
+				s.executeQuery("select c12 from destWithAI order by c12"),
+				expected);
 		
 		assertEquals(2, s.executeUpdate("insert into destWithNoAI(c22) select distinct(c31) from
source"));
 		expected = new String [][] { {null, "1"}, 
 				                     {null, "2"} };
-		JDBC.assertFullResultSet(s.executeQuery("select * from destWithNoAI"), expected);
+		JDBC.assertFullResultSet(
+				s.executeQuery("select * from destWithNoAI order by c22"),
+				expected);
 		
 		s.execute("drop table source");
 		s.execute("drop table destWithNoAI");



Mime
View raw message