db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1379519 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/UngroupedAggregatesNegativeTest.java
Date Fri, 31 Aug 2012 17:30:47 GMT
Author: rhillegas
Date: Fri Aug 31 17:30:46 2012
New Revision: 1379519

URL: http://svn.apache.org/viewvc?rev=1379519&view=rev
Log:
DERBY-672: Attempt to fix broken test case for user defined aggregates on jsr169 platforms.

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

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/UngroupedAggregatesNegativeTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/UngroupedAggregatesNegativeTest.java?rev=1379519&r1=1379518&r2=1379519&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/UngroupedAggregatesNegativeTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/UngroupedAggregatesNegativeTest.java
Fri Aug 31 17:30:46 2012
@@ -115,8 +115,26 @@ public class UngroupedAggregatesNegative
         
         Statement st = createStatement();
 
-        st.execute( "create derby aggregate bad_mode for int\n" +
-                    "external name 'org.apache.derbyTesting.functionTests.tests.lang.ModeAggregate'"
);
+        st.execute
+            (
+             "create derby aggregate bad_mode for int\n" +
+             "external name 'org.apache.derbyTesting.functionTests.tests.lang.ModeAggregate'"
+             );
+        
+        try {
+            st.execute
+                (
+                 "select bad_mode( columnnumber ) from sys.syscolumns" 
+                 );
+            fail( "Aggregate unexpectedly succeeded." );
+        } catch (SQLException se)
+        {
+            String  actualSQLState = se.getSQLState();
+            if ( !"XBCM5".equals( actualSQLState ) && !"XJ001".equals( actualSQLState
) )
+            {
+                fail( "Unexpected SQLState: " + actualSQLState );
+            }
+        }
 
         assertStatementError("XBCM5", st,
                              "select bad_mode( columnnumber ) from sys.syscolumns" );



Mime
View raw message