db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fuzzylo...@apache.org
Subject svn commit: r523546 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests: master/ master/j9_13/ master/j9_22/ suites/ tests/lang/
Date Thu, 29 Mar 2007 03:43:26 GMT
Author: fuzzylogic
Date: Wed Mar 28 20:43:25 2007
New Revision: 523546

URL: http://svn.apache.org/viewvc?view=rev&rev=523546
Log:
DERBY-2491: Add DistinctTest to lang/_Suite, remove old distinct tests.

Removed:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/distinct.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/distinctElimination.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/distinctFiltering.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_13/distinct.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_22/distinct.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/distinct.minisql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/distinct.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/distinct.subsql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/distinctElimination.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/distinctElimination_derby.properties
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/distinctFiltering.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/distinct_derby.properties
Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbylang.runall
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/DistinctTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbylang.runall
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbylang.runall?view=diff&rev=523546&r1=523545&r2=523546
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbylang.runall
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbylang.runall
Wed Mar 28 20:43:25 2007
@@ -23,9 +23,6 @@
 lang/declareGlobalTempTableJava.java
 lang/declareGlobalTempTableJavaJDBC30.java
 lang/desc_index.sql
-lang/distinct.sql
-lang/distinctElimination.sql
-lang/distinctFiltering.sql
 lang/dropTable.sql
 lang/dynamicLikeOptimization.sql
 lang/emptyStatistics.sql

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?view=diff&rev=523546&r1=523545&r2=523546
==============================================================================
--- 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
Wed Mar 28 20:43:25 2007
@@ -27,12 +27,14 @@
 import java.sql.ResultSetMetaData;
 import java.sql.SQLException;
 import java.sql.Statement;
+import java.util.Properties;
 
 import org.apache.derbyTesting.junit.BaseJDBCTestCase;
 import org.apache.derbyTesting.junit.CleanDatabaseTestSetup;
 import org.apache.derbyTesting.junit.JDBC;
 import org.apache.derbyTesting.junit.RuntimeStatisticsParser;
 import org.apache.derbyTesting.junit.SQLUtilities;
+import org.apache.derbyTesting.junit.SystemPropertyTestSetup;
 
 import junit.framework.Assert;
 import junit.framework.Test;
@@ -49,9 +51,12 @@
 	}
 	
 	public static Test suite() {
-		TestSuite suite = new TestSuite(DistinctTest.class);
+		Test s = new TestSuite(DistinctTest.class);
+		Properties p = new Properties();
+		p.put("derby.optimizer.noTimeout", "true");
+		Test t = new SystemPropertyTestSetup(s, p);
 		
-		return new CleanDatabaseTestSetup(suite) {
+		return new CleanDatabaseTestSetup(t) {
 			protected void decorateSQL(Statement s) throws SQLException {
 				s.execute("create table t (i int, s smallint, r real, f float, d date, t time, ts timestamp,
c char(10), v varchar(20))");
  
@@ -488,13 +493,15 @@
 		s.execute("insert into netbuttonlibraryrole1 values('lusername1', 1,'user1', 'role1', default)");
 		s.execute("insert into netbuttonlibraryrole1 values('lusername2', 2,'user2', 'role2', default)");
 		
-		
 		PreparedStatement p = prepareStatement("SELECT DISTINCT nb.name AS name, nb.summary AS
summary FROM netbutton1 nb, netbuttonlibraryrole1 nlr, library_netbutton ln" +
+		" WHERE nb.lname = ln.lname AND (nlr.lusername = ? OR nlr.lusername =?)");
+
+		p = prepareStatement("SELECT DISTINCT nb.name AS name, nb.summary AS summary FROM netbutton1
nb, netbuttonlibraryrole1 nlr, library_netbutton ln" +
 				" WHERE nlr.netbuttonlibrary_id = ln.netbuttonlibrary_id AND nb.lname = ln.lname AND
(nlr.lusername = ? OR nlr.lusername = ?) AND nb.lname = ? ORDER BY summary");
 		
 		p.setString(1, "lusername1");
 		p.setString(2, "lusername2");
-		p.setString(3, "lname1");
+		//p.setString(3, "lname1");
 		assertTrue(p.execute());
 
 	
@@ -536,6 +543,7 @@
 		s.execute("drop table td");
 		s.close();
 	}
+	
 	/**
 	 * Tests for DERBY-504 (select distinct from a subquery)
 	 * 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java?view=diff&rev=523546&r1=523545&r2=523546
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java
Wed Mar 28 20:43:25 2007
@@ -89,6 +89,8 @@
         suite.addTest(HoldCursorTest.suite());
         suite.addTest(ShutdownDatabaseTest.suite());
         suite.addTest(SystemCatalogTest.suite());
+        suite.addTest(DistinctTest.suite());
+        suite.addTest(GroupByTest.suite());
 
         // Add the XML tests, which exist as a separate suite
         // so that users can "run all XML tests" easily.



Mime
View raw message