db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1398934 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/UserDefinedAggregatesTest.java
Date Tue, 16 Oct 2012 19:16:57 GMT
Author: rhillegas
Date: Tue Oct 16 19:16:57 2012
New Revision: 1398934

URL: http://svn.apache.org/viewvc?rev=1398934&view=rev
Log:
DERBY-672: Run user-defined aggregate tests with collation turned off and turned on.

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

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/UserDefinedAggregatesTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/UserDefinedAggregatesTest.java?rev=1398934&r1=1398933&r2=1398934&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/UserDefinedAggregatesTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/UserDefinedAggregatesTest.java
Tue Oct 16 19:16:57 2012
@@ -33,6 +33,8 @@ import java.sql.Clob;
 import java.util.HashMap;
 
 import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.apache.derbyTesting.junit.Decorator;
 import org.apache.derbyTesting.junit.TestConfiguration;
 import org.apache.derbyTesting.junit.JDBC;
 
@@ -101,7 +103,28 @@ public class UserDefinedAggregatesTest  
      */
     public static Test suite()
     {
-        return TestConfiguration.defaultSuite(UserDefinedAggregatesTest.class);
+        TestSuite       suite = new TestSuite( "UserDefinedAggregatesTest" );
+
+        suite.addTest( TestConfiguration.defaultSuite(UserDefinedAggregatesTest.class) );
+        suite.addTest( collatedSuite( "en" ) );
+
+        return suite;
+    }
+
+    /**
+     * Return a suite that uses a single use database with
+     * a primary fixture from this test plus potentially other
+     * fixtures.
+     * @param locale Locale to use for the database
+     * @param baseFixture Base fixture from this test.
+     * @return suite of tests to run for the given locale
+     */
+    private static Test collatedSuite(String locale)
+    {
+        TestSuite suite = new TestSuite( "UserDefinedAggregatesTest:territory=" + locale
);
+        suite.addTest( TestConfiguration.defaultSuite(UserDefinedAggregatesTest.class) );
+
+        return Decorator.territoryCollatedDatabase( suite, locale );
     }
 
     ///////////////////////////////////////////////////////////////////////////////////



Mime
View raw message