You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by ma...@apache.org on 2010/06/25 04:36:57 UTC

svn commit: r957785 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/memory/TriggerTests.java

Author: mamta
Date: Fri Jun 25 02:36:56 2010
New Revision: 957785

URL: http://svn.apache.org/viewvc?rev=957785&view=rev
Log:
DERBY-1482 (Update triggers on tables with blob columns stream blobs into memory even when the blobs are not referenced/accessed.)

Reduced the size of LOBs in the test to 50MB since junit-lowmem gets run with 16MB and hence no need to read unnecessarily larger LOB(the test was testing with 300MB lobs). 

Also, some subset of tests are relying on DriverManager which is not available with J2ME. I have disabled those subset of tests to not run under J2ME framework.


Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/memory/TriggerTests.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/memory/TriggerTests.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/memory/TriggerTests.java?rev=957785&r1=957784&r2=957785&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/memory/TriggerTests.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/memory/TriggerTests.java Fri Jun 25 02:36:56 2010
@@ -15,10 +15,11 @@ import org.apache.derbyTesting.junit.Bas
 import org.apache.derbyTesting.junit.CleanDatabaseTestSetup;
 import org.apache.derbyTesting.junit.SystemPropertyTestSetup;
 import org.apache.derbyTesting.junit.TestConfiguration;
+import org.apache.derbyTesting.junit.JDBC;
 
 public class TriggerTests extends BaseJDBCTestCase {
 
-	final int lobsize = 300000*1024;
+	final int lobsize = 50000*1024;
 	boolean testWithLargeDataInLOB = true;
 	
 	/**
@@ -328,6 +329,12 @@ public class TriggerTests extends BaseJD
 	 * @throws SQLException
 	 */
 	public void test1InsertAfterTriggerStoredProc() throws SQLException{
+        // JSR169 cannot run with tests with stored procedures
+        // that do database access - for they require a
+        // DriverManager connection to jdbc:default:connection;
+        // DriverManager is not supported with JSR169.
+        if (JDBC.vmSupportsJSR169()) 
+        	return;
         basicSetup();
         Statement s = createStatement();
         s.execute("create procedure proc_test1_InsertAfterTrigger_update_table " +
@@ -458,6 +465,12 @@ public class TriggerTests extends BaseJD
 	 * @throws SQLException
 	 */
 	public void test1UpdateAfterTriggerStoredProc() throws SQLException{
+        // JSR169 cannot run with tests with stored procedures
+        // that do database access - for they require a
+        // DriverManager connection to jdbc:default:connection;
+        // DriverManager is not supported with JSR169.
+        if (JDBC.vmSupportsJSR169()) 
+        	return;
         basicSetup();
         Statement s = createStatement();
         s.execute("create procedure proc_test1_UpdateAfterTrigger_update_table " +
@@ -510,6 +523,12 @@ public class TriggerTests extends BaseJD
 	 * @throws SQLException
 	 */
 	public void test1InsertBeforeTriggerStoredProc() throws SQLException{
+        // JSR169 cannot run with tests with stored procedures
+        // that do database access - for they require a
+        // DriverManager connection to jdbc:default:connection;
+        // DriverManager is not supported with JSR169.
+        if (JDBC.vmSupportsJSR169()) 
+        	return;
         basicSetup();
         Statement s = createStatement();
         s.execute("create procedure proc_test1_InsertBeforeTrigger_select_table " +
@@ -643,6 +662,12 @@ public class TriggerTests extends BaseJD
 	 * @throws SQLException
 	 */
 	public void test1UpdateBeforeTriggerStoredProc() throws SQLException{
+        // JSR169 cannot run with tests with stored procedures
+        // that do database access - for they require a
+        // DriverManager connection to jdbc:default:connection;
+        // DriverManager is not supported with JSR169.
+        if (JDBC.vmSupportsJSR169()) 
+        	return;
         basicSetup();
         Statement s = createStatement();
         s.execute("create procedure proc_test1_UpdateBeforeTrigger_select_table " +