db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r515320 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests: master/DerbyNet/prepStmtMetaData.out master/DerbyNetClient/prepStmtMetaData.out master/prepStmtMetaData.out tests/jdbcapi/prepStmtMetaData.java
Date Tue, 06 Mar 2007 22:17:54 GMT
Author: kmarsden
Date: Tue Mar  6 14:17:53 2007
New Revision: 515320

URL: http://svn.apache.org/viewvc?view=rev&rev=515320
Log:
Reduce prepStmtMetaData to a single master so that it can be run under the
adapter

Removed:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/prepStmtMetaData.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/prepStmtMetaData.out
Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/prepStmtMetaData.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/prepStmtMetaData.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/prepStmtMetaData.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/prepStmtMetaData.out?view=diff&rev=515320&r1=515319&r2=515320
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/prepStmtMetaData.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/prepStmtMetaData.out
Tue Mar  6 14:17:53 2007
@@ -19,8 +19,6 @@
 ResultSetMetaData is Null or empty
 bug 4579 and 5338 : Result meta data for select *
 C11
-bug 4579 and 5338 : Result meta data for select * after alter table but w/o execute query
-C11,C12
-bug 4579 and 5338 : Result meta data for select * after alter table and execute query
-C11,C12,C13
+ Result meta data for select * after alter table but w/o execute query
+Result meta data for select * after alter table and execute query
 Test prepStmtMetaData finished

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/prepStmtMetaData.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/prepStmtMetaData.java?view=diff&rev=515320&r1=515319&r2=515320
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/prepStmtMetaData.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/prepStmtMetaData.java
Tue Mar  6 14:17:53 2007
@@ -32,6 +32,7 @@
 import java.sql.Types;
 
 import org.apache.derby.tools.ij;
+import org.apache.derbyTesting.functionTests.util.TestUtil;
 
 /**
  * Test of prepared statement getMetaData for statements that don't produce a
@@ -129,13 +130,37 @@
 			dumpRSMetaData(met);
 			executeStmt(con,"alter table bug4579 add column c12 int");
 			met = ps.getMetaData();
-			System.out.println("bug 4579 and 5338 : Result meta data for select * after alter table
but w/o execute query");
-			dumpRSMetaData(met);
+                        System.out.println(" Result meta data for select * after alter table
but w/o execute query");
+                        int numCols = met.getColumnCount();
+                        // DERBY-2402 Client does not report added columns.
+                        // Take out embedded check when DERBY-2402 is fixed
+                        if (TestUtil.isEmbeddedFramework())
+                        {
+                            if (numCols != 2)
+                                System.out.println("FAIL: Expected 2 columns but got only
" + numCols);
+                            if (!met.getColumnLabel(1).equals("C11") ||
+                                    !met.getColumnLabel(2).equals("C12"))
+                                    System.out.println("FAIL: Unexpected column label");
+                        }
+			//dumpRSMetaData(met);
 			executeStmt(con,"alter table bug4579 add column c13 int");
 			ps.execute();
 			met = ps.getMetaData();
-			System.out.println("bug 4579 and 5338 : Result meta data for select * after alter table
and execute query");
-			dumpRSMetaData(met);
+                        numCols = met.getColumnCount();
+			System.out.println("Result meta data for select * after alter table and execute query");
+                         // DERBY-2402 Client does not report added columns.
+                        // Take out embedded check when DERBY-2402 is fixed
+                        if (TestUtil.isEmbeddedFramework())
+                        {
+                          if (numCols != 3)
+                                System.out.println("FAIL: Expected 3 columns but got only
" + numCols);
+                          if (!met.getColumnLabel(1).equals("C11") ||
+                                  !met.getColumnLabel(2).equals("C12") ||
+                                  !met.getColumnLabel(3).equals("C13"))
+                              System.out.println("FAIL: Unexpected column value");
+                          
+                        }
+                        //dumpRSMetaData(met);
 			ps.close();
 
 			// clean up



Mime
View raw message