db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1431948 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LangProcedureTest.java
Date Fri, 11 Jan 2013 09:24:21 GMT
Author: kahatlen
Date: Fri Jan 11 09:24:21 2013
New Revision: 1431948

URL: http://svn.apache.org/viewvc?rev=1431948&view=rev
Log:
DERBY-6039: Intermittent failure in LangProcedureTest.testDynamicResultSets: Table/View 'T1'
does not exist.

Let testDynamicResultSets() create its own test table, rather than
relying on one created by another test case. Removes dependency on
test case ordering.

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

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LangProcedureTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LangProcedureTest.java?rev=1431948&r1=1431947&r2=1431948&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LangProcedureTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LangProcedureTest.java
Fri Jan 11 09:24:21 2013
@@ -651,8 +651,8 @@ public class LangProcedureTest extends B
 
         s.execute("drop procedure IR");
         s.execute("drop procedure IR2");
-
-        s.close();
+        s.execute("drop table t1");
+        commit();
     }
 
     /**
@@ -678,6 +678,12 @@ public class LangProcedureTest extends B
                   "language java external name '" +
                   thisClassName + ".selectRows'");
 
+        // Create a test table with some data that can be accessed by the
+        // DRS procedure.
+        s.execute("create table t1(i int not null primary key, b char(15))");
+        s.execute("insert into t1 values (1, 'int'), (2, 'int'), (3, 'int'), "
+                + "(7, 'int'), (4, '4'), (5, 'ir2'), (6, '''012345678')");
+
         String[] sysaliasDefinition = {
             "APP.DRS AS " + thisClassName + ".selectRows" +
             "(IN \"P1\" INTEGER) " +
@@ -978,7 +984,11 @@ public class LangProcedureTest extends B
             conn.setAutoCommit(oldAutoCommit);
         }
 
-        s.close();
+        s.execute("drop procedure drs");
+        s.execute("drop procedure drs2");
+        s.execute("drop table t1");
+        commit();
+
         conn2.close();
     }
 



Mime
View raw message