db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrn...@apache.org
Subject svn commit: r897938 [1/2] - in /db/derby/code/trunk/java: engine/org/apache/derby/iapi/services/context/ engine/org/apache/derby/impl/sql/execute/ testing/org/apache/derbyTesting/functionTests/harness/ testing/org/apache/derbyTesting/functionTests/mast...
Date Mon, 11 Jan 2010 16:54:02 GMT
Author: myrnavl
Date: Mon Jan 11 16:54:01 2010
New Revision: 897938

URL: http://svn.apache.org/viewvc?rev=897938&view=rev
Log:
DERBY-4038; convert access.sql to junit to avoid an intermittent error on IBM zseries machines
when the test is run in the encryption suite.

Added:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/AccessTest.java
  (with props)
Removed:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/access.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/access.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/access_app.properties
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/access_derby.properties
Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextService.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InternalTriggerExecutionContext.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/OrderableAggregator.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/EncryptionSuite.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encryptionAES.runall
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encryptionBlowfish.runall
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encryptionCFB.runall
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encryptionDES.runall
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encryptionECB.runall
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encryptionOFB.runall
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/storemats.runall
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/_Suite.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/RuntimeStatisticsParser.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextService.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextService.java?rev=897938&r1=897937&r2=897938&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextService.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextService.java
Mon Jan 11 16:54:01 2010
@@ -21,19 +21,16 @@
 
 package org.apache.derby.iapi.services.context;
 
-import org.apache.derby.iapi.error.ShutdownException;
-import org.apache.derby.iapi.services.monitor.Monitor;
-import org.apache.derby.iapi.services.sanity.SanityManager;
-import org.apache.derby.iapi.services.stream.HeaderPrintWriter;
-
 import java.security.AccessController;
 import java.security.PrivilegedAction;
-import java.util.Hashtable;
-import java.util.Enumeration;
-
 import java.util.HashSet;
 import java.util.Iterator;
 
+import org.apache.derby.iapi.error.ShutdownException;
+import org.apache.derby.iapi.services.monitor.Monitor;
+import org.apache.derby.iapi.services.sanity.SanityManager;
+import org.apache.derby.iapi.services.stream.HeaderPrintWriter;
+
 /**
 	A set of static methods to supply easier access to contexts.
 */

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InternalTriggerExecutionContext.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InternalTriggerExecutionContext.java?rev=897938&r1=897937&r2=897938&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InternalTriggerExecutionContext.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InternalTriggerExecutionContext.java
Mon Jan 11 16:54:01 2010
@@ -21,30 +21,28 @@
 
 package org.apache.derby.impl.sql.execute;
 
-import org.apache.derby.iapi.services.sanity.SanityManager;
-import org.apache.derby.iapi.error.PublicAPI;
+import java.sql.SQLException;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Map;
+import java.util.Vector;
+
+import org.apache.derby.catalog.UUID;
 import org.apache.derby.iapi.db.TriggerExecutionContext;
+import org.apache.derby.iapi.error.ExceptionSeverity;
+import org.apache.derby.iapi.error.PublicAPI;
+import org.apache.derby.iapi.error.StandardException;
+import org.apache.derby.iapi.jdbc.ConnectionContext;
+import org.apache.derby.iapi.reference.SQLState;
+import org.apache.derby.iapi.services.i18n.MessageService;
+import org.apache.derby.iapi.services.sanity.SanityManager;
 import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;
-import org.apache.derby.iapi.sql.ResultSet;
+import org.apache.derby.iapi.sql.dictionary.TriggerDescriptor;
+import org.apache.derby.iapi.sql.execute.ConstantAction;
 import org.apache.derby.iapi.sql.execute.CursorResultSet;
 import org.apache.derby.iapi.sql.execute.ExecRow;
-import org.apache.derby.iapi.types.DataValueDescriptor;
 import org.apache.derby.iapi.sql.execute.ExecutionStmtValidator;
-import org.apache.derby.iapi.sql.execute.ConstantAction;
-import org.apache.derby.iapi.sql.dictionary.TriggerDescriptor;
-import org.apache.derby.iapi.error.StandardException;
-import org.apache.derby.iapi.services.i18n.MessageService;
-import org.apache.derby.iapi.reference.SQLState;
-import org.apache.derby.iapi.jdbc.ConnectionContext; 
-import org.apache.derby.catalog.UUID;
-import java.util.Enumeration;
-import java.util.Vector;
-import java.util.Hashtable;
-import java.util.Map;
-import java.sql.Connection;
-import java.sql.SQLException;
-import java.sql.Statement;
-import org.apache.derby.iapi.error.ExceptionSeverity;
+import org.apache.derby.iapi.types.DataValueDescriptor;
 /**
  * There is one of these beasts per INSERT/DELETE/UPDATE 
  * statement.  It fulfills the contract for the externally

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/OrderableAggregator.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/OrderableAggregator.java?rev=897938&r1=897937&r2=897938&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/OrderableAggregator.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/OrderableAggregator.java
Mon Jan 11 16:54:01 2010
@@ -21,16 +21,14 @@
 
 package org.apache.derby.impl.sql.execute;
 
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+import org.apache.derby.iapi.error.StandardException;
 import org.apache.derby.iapi.services.sanity.SanityManager;
 import org.apache.derby.iapi.sql.execute.ExecAggregator;
 import org.apache.derby.iapi.types.DataValueDescriptor;
-import org.apache.derby.iapi.error.StandardException;
-import org.apache.derby.iapi.services.io.Formatable;
-
-
-import java.io.ObjectOutput;
-import java.io.ObjectInput;
-import java.io.IOException;
 
 /**
  * Abstract aggregator for Orderable aggregates (max/min).

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java?rev=897938&r1=897937&r2=897938&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java
Mon Jan 11 16:54:01 2010
@@ -21,44 +21,32 @@
 
 package org.apache.derbyTesting.functionTests.harness;
 
-import org.apache.derby.tools.sysinfo;
-import org.apache.derby.tools.ij;
-import org.apache.derby.iapi.reference.Attribute;
-
-import java.io.File;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.ByteArrayInputStream;
+import java.io.BufferedOutputStream;
 import java.io.BufferedReader;
-import java.io.FileReader;
-import java.io.FileWriter;
+import java.io.BufferedWriter;
+import java.io.File;
 import java.io.FileInputStream;
+import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
-import java.io.BufferedOutputStream;
-import java.io.BufferedWriter;
+import java.io.FileReader;
 import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
 import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
 import java.io.PrintStream;
-import java.io.IOException;
-import java.io.FileNotFoundException;
-import java.lang.ClassNotFoundException;
-import java.lang.ClassFormatError;
-import java.lang.Thread;
+import java.io.PrintWriter;
 import java.lang.reflect.Method;
 import java.util.Enumeration;
 import java.util.Locale;
-import java.util.Vector;
-import java.sql.Timestamp;
-import java.sql.Connection;
-import java.sql.SQLException;
-import java.sql.DriverManager;
 import java.util.Properties;
 import java.util.StringTokenizer;
-import java.net.URL;
+import java.util.Vector;
 
 import junit.framework.TestSuite;
 
+import org.apache.derby.iapi.reference.Attribute;
+
 public class RunTest
 {
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/EncryptionSuite.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/EncryptionSuite.java?rev=897938&r1=897937&r2=897938&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/EncryptionSuite.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/EncryptionSuite.java
Mon Jan 11 16:54:01 2010
@@ -20,8 +20,12 @@
  */
 package org.apache.derbyTesting.functionTests.suites;
 
+import java.sql.Connection;
 import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.Properties;
 
+import org.apache.derbyTesting.functionTests.tests.store.AccessTest;
 import org.apache.derbyTesting.junit.BaseJDBCTestCase;
 import org.apache.derbyTesting.junit.Decorator;
 import org.apache.derbyTesting.junit.JDBC;
@@ -98,9 +102,44 @@
         // no tests that were previously run under encryption converted.
         suite.addTestSuite(EncryptionSuite.class);
         
+        Properties sysProps = new Properties();
+        sysProps.put("derby.optimizer.optimizeJoinOrder", "false");
+        sysProps.put("derby.optimizer.ruleBasedOptimization", "true");
+        sysProps.put("derby.optimizer.noTimeout", "true");
+        
+        suite.addTestSuite(AccessTest.class);
+        
         return suite;
     }
     
+    protected void setUp() {
+        
+        try { 
+                Connection conn = getConnection();
+                Statement s = createStatement();
+
+                s.execute("CREATE FUNCTION  PADSTRING (DATA VARCHAR(32000), "
+                        + "LENGTH INTEGER) RETURNS VARCHAR(32000) EXTERNAL NAME " +
+                        "'org.apache.derbyTesting.functionTests.util.Formatters" +
+                ".padString' LANGUAGE JAVA PARAMETER STYLE JAVA");
+                s.close();
+                conn.close();
+
+        } catch (SQLException se) {
+            // ignore
+        }
+    }
+    
+    public void tearDown() throws Exception {
+        Statement st = createStatement();
+        super.tearDown();
+        try {
+            st.executeUpdate("DROP FUNCTION PADSTRING");
+        } catch (SQLException e) {
+            // never mind.
+        }
+    }
+    
     /**
      * Very simple test that ensures we can get a connection to
      * the booted encrypted database.
@@ -110,4 +149,6 @@
     {
         getConnection().close();
     }
+    
+    
 }

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encryptionAES.runall
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encryptionAES.runall?rev=897938&r1=897937&r2=897938&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encryptionAES.runall
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encryptionAES.runall
Mon Jan 11 16:54:01 2010
@@ -1,2 +1 @@
 store/encryptDatabase.sql
-store/access.sql

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encryptionBlowfish.runall
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encryptionBlowfish.runall?rev=897938&r1=897937&r2=897938&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encryptionBlowfish.runall
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encryptionBlowfish.runall
Mon Jan 11 16:54:01 2010
@@ -1,3 +1,2 @@
 unit/T_CipherBlowfish.unit
 store/encryptDatabase.sql
-store/access.sql

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encryptionCFB.runall
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encryptionCFB.runall?rev=897938&r1=897937&r2=897938&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encryptionCFB.runall
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encryptionCFB.runall
Mon Jan 11 16:54:01 2010
@@ -1,3 +1,2 @@
 unit/T_CipherCFB.unit
 store/encryptDatabase.sql
-store/access.sql

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encryptionDES.runall
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encryptionDES.runall?rev=897938&r1=897937&r2=897938&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encryptionDES.runall
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encryptionDES.runall
Mon Jan 11 16:54:01 2010
@@ -1,3 +1,2 @@
 unit/T_CipherDES.unit
 store/encryptDatabase.sql
-store/access.sql

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encryptionECB.runall
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encryptionECB.runall?rev=897938&r1=897937&r2=897938&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encryptionECB.runall
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encryptionECB.runall
Mon Jan 11 16:54:01 2010
@@ -1,3 +1,2 @@
 unit/T_CipherECB.unit
 store/encryptDatabase.sql
-store/access.sql

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encryptionOFB.runall
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encryptionOFB.runall?rev=897938&r1=897937&r2=897938&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encryptionOFB.runall
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encryptionOFB.runall
Mon Jan 11 16:54:01 2010
@@ -1,3 +1,2 @@
 unit/T_CipherOFB.unit
 store/encryptDatabase.sql
-store/access.sql

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/storemats.runall
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/storemats.runall?rev=897938&r1=897937&r2=897938&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/storemats.runall
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/storemats.runall
Mon Jan 11 16:54:01 2010
@@ -1,6 +1,5 @@
 store/RowLockBasic.sql
 store/TableLockBasic.sql
-store/access.sql
 store/longColumn.sql
 store/madhare.sql
 store/updatelocksJDBC30.sql



Mime
View raw message