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 ka...@apache.org on 2011/08/25 09:33:01 UTC
svn commit: r1161422 - in
/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests:
tests/junitTests/compatibility/ util/
Author: kahatlen
Date: Thu Aug 25 07:33:01 2011
New Revision: 1161422
URL: http://svn.apache.org/viewvc?rev=1161422&view=rev
Log:
DERBY-4785: Remove JCC tests and references to JCC in test code
Remove code to handle JCC and Java 1.3 in the compatibility tests.
Modified:
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/CompatibilityCombinations.java
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/CompatibilitySuite.java
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/JDBCDriverTest.java
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/README.html
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/testScript.xml
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/DerbyJUnitTest.java
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/CompatibilityCombinations.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/CompatibilityCombinations.java?rev=1161422&r1=1161421&r2=1161422&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/CompatibilityCombinations.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/CompatibilityCombinations.java Thu Aug 25 07:33:01 2011
@@ -25,7 +25,6 @@ import org.apache.derbyTesting.junit.Bas
import org.apache.derby.drda.NetworkServerControl;
-import java.sql.*;
import java.io.*;
import java.util.*;
@@ -83,7 +82,6 @@ import junit.framework.TestSuite;
* # 'jvm.versions' tells how many. 'jvm.N=<descriptive_name>' defines
* # names of properties giving the full path to the actual jvms.
* jvm.versions=3
- * # jvm.0=j13lib
* jvm.0=j14lib
* jvm.1=j15lib
* jvm.2=j16lib
@@ -128,10 +126,6 @@ import junit.framework.TestSuite;
* test.securityOption=noSecurityManager
*
* #-----------------------------
- * # Driver to use for 10.0.2.1(incubator version - no Derby provided driver):
- * db2jcc_lib=/usr/local/share/java/db2jcc/lib
- *
- * #-----------------------------
* # Use a special testing jar? Optional
* # E.g. your own experimental:
* # test.derbyTestingJar=/home/testuser/Derby/testSandbox/trunk/jars/insane/derbyTesting.jar
@@ -157,8 +151,6 @@ import junit.framework.TestSuite;
* ##############################
* # Utilities...
* junit_jar=/usr/local/share/java/junit3.8.2/junit.jar
- * jce_jar=/usr/local/share/java/jce1.2.2/lib/jce1_2_2.jar
- * jdbc2_0_stdext_jar=/usr/local/share/java/jdbc2.0-stdext/jdbc2_0-stdext.jar
*
* ##############################
*
@@ -196,13 +188,9 @@ public class CompatibilityCombinations e
private final static int DERBYMAX_JAR = DERBYTESTING_JAR;
private static String[][] derbyLib = null; // Size: [derbyVerLibs.length()][DERBYMAX_JAR]
- private static String db2jcc_lib = null; // Path for db2jcc library.
- private static String CLIENT_DB2JCC = null; // Path for db2jcc.jar and db2jcc_license_c.jar (in db2jcc_lib)
private static String junit_jar = null; // Path for JUnit jar
- private static String jce_jar = null; // Path for jce_jar
- private static String jdbc2_0_stdext_jar = null; // Path for jdbc2_0-stdext.jar
- private static String test_jars = null; // Path for derbyTesting.jar:junit_jar:jce_jar
+ private static String test_jars = null; // Path for derbyTesting.jar:junit_jar
private static String serverHost = "localhost"; // Currently only handles localhost!
private static int serverPort = 1527; // Since CompatibilitySuite and JDBCDriverTest only handles default..
@@ -360,7 +348,6 @@ public class CompatibilityCombinations e
{
String creatorJvm = VM_Ids[serverVM]+JVMloc; // Create db using server VM
- // Original ant testScript uses CLIENT_DB2JCC:
String derbyCreatorJar = derbyLib[trunkVersion][DERBY_JAR] // and trunk Derby version.
+":"+derbyLib[trunkVersion][DERBYNET_JAR];
@@ -368,7 +355,6 @@ public class CompatibilityCombinations e
String creatorClassPath = derbyCreatorJar
+":"+derbyTestingJar
+":"+junit_jar
- +":"+jce_jar
;
recreateDB(trunkVersion
, creatorJvm
@@ -397,8 +383,9 @@ public class CompatibilityCombinations e
String derbyClientJar = derbyCreatorJar;
if ( derbyVersionNames[clientVersion].equalsIgnoreCase("10.0.2.1") ) // Has no own client
{
- derbyClientJar = CLIENT_DB2JCC;
- clientName = "10.0.DB2JCC"; // Pre-pend 10.0. to get a "natural" sorting of log files...
+ // Skip client testing of this version since there
+ // is no client.
+ continue;
}
DEBUG("derbyClientJar: "+derbyClientJar);
String clientJvm = VM_Ids[clientVM]+JVMloc;
@@ -406,8 +393,6 @@ public class CompatibilityCombinations e
String clientClassPath = derbyClientJar
+":"+derbyTestingJar
+":"+junit_jar
- +":"+jce_jar
- +":"+jdbc2_0_stdext_jar
;
String combinationName =
"Embedded_"+derbyVersionNames[trunkVersion]+"VM"+vmNames[serverVM]
@@ -539,17 +524,19 @@ public class CompatibilityCombinations e
startServer(serverVM, serverVersion);
String creatorJvm = VM_Ids[serverVM]+JVMloc; // Create db using server VM
- // Original ant testScript uses CLIENT_DB2JCC:
String derbyCreatorJar = derbyLib[0][DERBYCLIENT_JAR]; // and first(lowest) Derby version.
if ( derbyVersionNames[0].equalsIgnoreCase("10.0.2.1") ) // Has no own client
{
- derbyCreatorJar = CLIENT_DB2JCC;
+ // Pick the next Derby version in case we don't have
+ // a client driver for the lowest version.
+ if (derbyLib.length > 1) {
+ derbyCreatorJar = derbyLib[1][DERBYCLIENT_JAR];
+ }
}
DEBUG("derbyCreatorJar: "+derbyCreatorJar);
String creatorClassPath = derbyCreatorJar
+":"+derbyTestingJar
+":"+junit_jar
- +":"+jce_jar
;
boolean deleteDatabaseFiles = !includeUpgrade;
if ( serverVersion == 0 ) deleteDatabaseFiles = true; // Always remove when starting from the initial Derby version.
@@ -592,23 +579,23 @@ public class CompatibilityCombinations e
}
for (int clientVersion=clientVersionLow;clientVersion<=clientVersionHigh;clientVersion++ )
{
- noOfCombinations++;
-
String clientName = derbyVersionNames[clientVersion];
String derbyClientJar = derbyLib[clientVersion][DERBYCLIENT_JAR];
if ( derbyVersionNames[clientVersion].equalsIgnoreCase("10.0.2.1") ) // Has no own client
{
- derbyClientJar = CLIENT_DB2JCC; // or derbynet
- clientName = "10.0.DB2JCC"; // Pre-pend 10.0. to get a "natural" sorting of log files...
+ // Skip this combination since we don't have a
+ // client driver.
+ continue;
}
+
+ noOfCombinations++;
+
DEBUG("derbyClientJar: "+derbyClientJar);
String clientJvm = VM_Ids[clientVM]+JVMloc;
String clientClassPath = derbyClientJar
+":"+derbyTestingJar
+":"+junit_jar
- +":"+jce_jar
- +":"+jdbc2_0_stdext_jar
;
String combinationName =
"ServerVM-"+vmNames[serverVM]+"_server"+derbyVersionNames[serverVersion]
@@ -838,10 +825,7 @@ public class CompatibilityCombinations e
* <li>derbyVersionNames[v]
* <li>derbyVersionNames[v]+"_SA"
* </ul>
- * <li>db2jcc_lib
* <li>junit_jar
- * <li>jce_jar
- * <li>jdbc2_0_stdext_jar
* </ul>
* @throws java.io.IOException .
*/
@@ -961,17 +945,8 @@ public class CompatibilityCombinations e
derbyLib[drbV][DERBYNET_JAR] = derbyVerLibs[drbV] + PS+"derbynet.jar";
}
- db2jcc_lib = cp.getProperty("db2jcc_lib");
- System.out.println("db2jcc_lib: " + db2jcc_lib);
- CLIENT_DB2JCC=db2jcc_lib+PS+"db2jcc.jar"
- +":"+db2jcc_lib+PS+"db2jcc_license_c.jar";
-
junit_jar = cp.getProperty("junit_jar");
System.out.println("junit_jar: " + junit_jar);
- jce_jar = cp.getProperty("jce_jar");
- System.out.println("jce_jar: " + jce_jar);
- jdbc2_0_stdext_jar = cp.getProperty("jdbc2_0_stdext_jar");
- System.out.println("jdbc2_0_stdext_jar: " + jdbc2_0_stdext_jar);
int currentTestVersion = derbyVerLibs.length -1; // Always use test from newest/highest version.
@@ -980,7 +955,6 @@ public class CompatibilityCombinations e
test_jars = derbyTestingJar
+ ":" + junit_jar
- + ":" + jce_jar
;
System.out.println("test_jars: " + test_jars);
System.out.println("--------------------------------------------------------");
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/CompatibilitySuite.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/CompatibilitySuite.java?rev=1161422&r1=1161421&r2=1161422&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/CompatibilitySuite.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/CompatibilitySuite.java Thu Aug 25 07:33:01 2011
@@ -30,7 +30,6 @@
package org.apache.derbyTesting.functionTests.tests.junitTests.compatibility;
-import java.io.*;
import java.sql.*;
import java.util.*;
@@ -46,9 +45,6 @@ public class CompatibilitySuite extends
//
/////////////////////////////////////////////////////////////
- // Supported versions of the db2jcc client.
- public static final Version IBM_2_4 = new Version( 2, 4 );
-
// Supported versions of Derby.
public static final Version DRB_10_0 = new Version( 10, 0 );
public static final Version DRB_10_1 = new Version( 10, 1 );
@@ -59,12 +55,6 @@ public class CompatibilitySuite extends
public static final Version DRB_10_6 = new Version( 10, 6 );
public static final Version DRB_10_7 = new Version( 10, 7 );
- // Supported VM versions.
- public static final Version VM_1_3 = new Version( 1, 3 );
- public static final Version VM_1_4 = new Version( 1, 4 );
- public static final Version VM_1_5 = new Version( 1, 5 );
- public static final Version VM_1_6 = new Version( 1, 6 );
-
public static final String SERVER_VERSION_FUNCTION = "getVMVersion";
private static final String VERSION_PROPERTY = "java.version";
@@ -247,7 +237,6 @@ public class CompatibilitySuite extends
if ( getClientSettings() != null ) { faultInDriver( getClientSettings() ); }
else
{
- String currentClientName = null;
int legalCount = LEGAL_CLIENTS.length;
int foundCount = 0;
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/JDBCDriverTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/JDBCDriverTest.java?rev=1161422&r1=1161421&r2=1161422&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/JDBCDriverTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/JDBCDriverTest.java Thu Aug 25 07:33:01 2011
@@ -60,8 +60,7 @@ public class JDBCDriverTest extends Comp
//
// This table declares the datatypes supported by Derby and the earliest
- // versions of the Derby and the db2jcc client which support these
- // datatypes.
+ // versions of the Derby client which support these datatypes.
//
// If you add a type to this table, make sure you add a corresponding
// column to the following row table. Also add a corresponding row to the
@@ -72,47 +71,47 @@ public class JDBCDriverTest extends Comp
// 10.0 types
new TypeDescriptor
- ( Types.BIGINT, "bigint", IBM_2_4, DRB_10_0, VM_1_3 ),
+ ( Types.BIGINT, "bigint", DRB_10_0),
new TypeDescriptor
- ( Types.BLOB, "blob", IBM_2_4, DRB_10_0, VM_1_3 ),
+ ( Types.BLOB, "blob", DRB_10_0),
new TypeDescriptor
- ( Types.CHAR, "char(5)", IBM_2_4, DRB_10_0, VM_1_3 ),
+ ( Types.CHAR, "char(5)", DRB_10_0),
new TypeDescriptor
- ( Types.BINARY, "char(5) for bit data", IBM_2_4, DRB_10_0, VM_1_3 ),
+ ( Types.BINARY, "char(5) for bit data", DRB_10_0),
new TypeDescriptor
- ( Types.CLOB, "clob", IBM_2_4, DRB_10_0, VM_1_3 ),
+ ( Types.CLOB, "clob", DRB_10_0),
new TypeDescriptor
- ( Types.DATE, "date", IBM_2_4, DRB_10_0, VM_1_3 ),
+ ( Types.DATE, "date", DRB_10_0),
new TypeDescriptor
- ( Types.DECIMAL, "decimal", IBM_2_4, DRB_10_0, VM_1_3 ),
+ ( Types.DECIMAL, "decimal", DRB_10_0),
new TypeDescriptor
- ( Types.DOUBLE, "double", IBM_2_4, DRB_10_0, VM_1_3 ),
+ ( Types.DOUBLE, "double", DRB_10_0),
new TypeDescriptor
- ( Types.DOUBLE, "double precision", IBM_2_4, DRB_10_0, VM_1_3 ),
+ ( Types.DOUBLE, "double precision", DRB_10_0),
new TypeDescriptor
- ( Types.REAL, "float(23)", IBM_2_4, DRB_10_0, VM_1_3 ),
+ ( Types.REAL, "float(23)", DRB_10_0),
new TypeDescriptor
- ( Types.DOUBLE, "float", IBM_2_4, DRB_10_0, VM_1_3 ),
+ ( Types.DOUBLE, "float", DRB_10_0),
new TypeDescriptor
- ( Types.INTEGER, "integer", IBM_2_4, DRB_10_0, VM_1_3 ),
+ ( Types.INTEGER, "integer", DRB_10_0),
new TypeDescriptor
- ( Types.LONGVARCHAR, "long varchar", IBM_2_4, DRB_10_0, VM_1_3 ),
+ ( Types.LONGVARCHAR, "long varchar", DRB_10_0),
new TypeDescriptor
- ( Types.LONGVARBINARY, "long varchar for bit data", IBM_2_4, DRB_10_0, VM_1_3 ),
+ ( Types.LONGVARBINARY, "long varchar for bit data", DRB_10_0),
new TypeDescriptor
- ( Types.NUMERIC, "numeric", IBM_2_4, DRB_10_0, VM_1_3 ),
+ ( Types.NUMERIC, "numeric", DRB_10_0),
new TypeDescriptor
- ( Types.REAL, "real", IBM_2_4, DRB_10_0, VM_1_3 ),
+ ( Types.REAL, "real", DRB_10_0),
new TypeDescriptor
- ( Types.SMALLINT, "smallint", IBM_2_4, DRB_10_0, VM_1_3 ),
+ ( Types.SMALLINT, "smallint", DRB_10_0),
new TypeDescriptor
- ( Types.TIME, "time", IBM_2_4, DRB_10_0, VM_1_3 ),
+ ( Types.TIME, "time", DRB_10_0),
new TypeDescriptor
- ( Types.TIMESTAMP, "timestamp", IBM_2_4, DRB_10_0, VM_1_3 ),
+ ( Types.TIMESTAMP, "timestamp", DRB_10_0),
new TypeDescriptor
- ( Types.VARCHAR, "varchar(5)", IBM_2_4, DRB_10_0, VM_1_3 ),
+ ( Types.VARCHAR, "varchar(5)", DRB_10_0),
new TypeDescriptor
- ( Types.VARBINARY, "varchar(5) for bit data", IBM_2_4, DRB_10_0, VM_1_3 ),
+ ( Types.VARBINARY, "varchar(5) for bit data", DRB_10_0),
};
//
@@ -671,47 +670,7 @@ public class JDBCDriverTest extends Comp
println( buffer.toString() );
- assertEquals( columnName, ddmdTypeKludge( typeDesc.getJdbcType() ), actualJdbcType );
- }
-
- close( rs );
- }
-
- //
- // Verify that we get the correct DatabaseMetaData for a procedure
- //
- private void checkProcMetadata( Connection conn, String procName, TypeDescriptor[] signature )
- throws Exception
- {
- String normalizedSchema = DEFAULT_USER_NAME.toUpperCase();
- String normalizedProc = procName.toUpperCase();
- DatabaseMetaData dbmd = conn.getMetaData();
-
- ResultSet rs = dbmd.getProcedureColumns
- ( null, normalizedSchema, normalizedProc, "%" );
-
- println( "Pawing through database metadata for " + normalizedSchema + '.' + normalizedProc );
-
- while( rs.next() )
- {
- String columnName = rs.getString( "COLUMN_NAME" );
- int actualJdbcType = rs.getInt( "DATA_TYPE" );
- TypeDescriptor typeDesc = getType( signature, columnName );
-
- if ( columnName.equals( KEY_COLUMN ) ) { continue; }
-
- StringBuffer buffer = new StringBuffer();
-
- buffer.append( "[ " );
- buffer.append( rs.getString( "COLUMN_NAME" ) );
- buffer.append( ",\t" );
- buffer.append( "type( " + rs.getInt( "DATA_TYPE" ) + " ),\t" );
- buffer.append( rs.getString( "TYPE_NAME" ) );
- buffer.append( " ]" );
-
- println( buffer.toString() );
-
- assertEquals( columnName, ddmdTypeKludge( typeDesc.getJdbcType() ), actualJdbcType );
+ assertEquals( columnName, typeDesc.getJdbcType(), actualJdbcType );
}
close( rs );
@@ -1004,31 +963,14 @@ public class JDBCDriverTest extends Comp
private int rsmdTypeKludge( int originalJDbcType )
{
// The embedded client does the right thing.
- if ( usingEmbeddedClient() && getServerVMVersion().atLeast( VM_1_4 ) ) { return originalJDbcType; }
+ if ( usingEmbeddedClient() ) { return originalJDbcType; }
switch( originalJDbcType )
{
//This kludge compensates for the fact that the DRDA clients report
// that NUMERIC columns are DECIMAL. See bug 584.
case Types.NUMERIC:
- if ( usingEmbeddedClient() ) { return originalJDbcType; }
- else { return Types.DECIMAL; }
-
- default: return originalJDbcType;
- }
- }
-
- //
- // This kludge compensates for the fact that servers return
- // different jdbc types depending on their vm.
- //
- private int ddmdTypeKludge( int originalJDbcType )
- {
- switch( originalJDbcType )
- {
- case JDBC_BOOLEAN:
- if ( getServerVMVersion().atLeast( VM_1_4 ) ) { return originalJDbcType; }
- else { return Types.BIT; }
+ return Types.DECIMAL;
default: return originalJDbcType;
}
@@ -1090,23 +1032,6 @@ public class JDBCDriverTest extends Comp
}
//
- // Lookup TypeDescriptors by column name in an array of types
- //
- private TypeDescriptor getType( TypeDescriptor[] types, String typeName )
- {
- int count = types.length;
-
- for ( int i = 0; i < count; i++ )
- {
- TypeDescriptor type = types[ i ];
-
- if ( type.getDerbyTypeName().equals( typeName ) ) { return type; }
- }
-
- return null;
- }
-
- //
// Index legal coercions by jdbc type.
//
private void buildCoercionMap()
@@ -1315,10 +1240,7 @@ public class JDBCDriverTest extends Comp
// return true if the client supports this datatype
private boolean clientSupports( TypeDescriptor type )
{
- Version firstSupportedVersion;
-
- if ( usingDB2Client() ) { firstSupportedVersion = type.getDb2jccVersion(); }
- else { firstSupportedVersion = type.getDerbyVersion(); }
+ Version firstSupportedVersion = type.getDerbyVersion();
if ( firstSupportedVersion == null ) { return false; }
else { return getDriverVersion().atLeast( firstSupportedVersion ); }
@@ -1352,38 +1274,30 @@ public class JDBCDriverTest extends Comp
/**
* <p>
* This helper class describes a legal datatype and the version of Derby
- * and db2jcc where the datatype first appears.
+ * where the datatype first appears.
* </p>
*/
public static final class TypeDescriptor
{
private int _jdbcType;
private String _derbyTypeName;
- private Version _db2jccVersion; // first db2jcc version which supports this type
private Version _derbyVersion; // first derby version which supports this type
- private Version _vmVersion; // first vm (jdbc) version which supports this type
public TypeDescriptor
(
int jdbcType,
String derbyTypeName,
- Version db2jccVersion,
- Version derbyVersion,
- Version vmVersion
+ Version derbyVersion
)
{
_jdbcType = jdbcType;
_derbyTypeName = derbyTypeName;
- _db2jccVersion = db2jccVersion;
_derbyVersion = derbyVersion;
- _vmVersion = vmVersion;
}
public int getJdbcType() { return _jdbcType; }
public String getDerbyTypeName() { return _derbyTypeName; }
- public Version getDb2jccVersion() { return _db2jccVersion; }
public Version getDerbyVersion() { return _derbyVersion; }
- public Version getVMVersion() { return _vmVersion; }
}
/**
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/README.html
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/README.html?rev=1161422&r1=1161421&r2=1161422&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/README.html (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/README.html Thu Aug 25 07:33:01 2011
@@ -45,7 +45,6 @@ currently test the following combination
<TR><TD>Derby 10.1</TD></TR>
<TR><TD>Derby 10.2</TD></TR>
- <TR><TD>DB2JCC 2.4</TD></TR>
</TBODY>
</TABLE>
@@ -66,9 +65,9 @@ currently test the following combination
<TABLE border="2">
<TBODY>
- <TR><TD>jdk1.3</TD></TR>
<TR><TD>jdk1.4</TD></TR>
<TR><TD>jdk1.5</TD></TR>
+ <TR><TD>jdk1.6</TD></TR>
</TBODY>
</TABLE>
@@ -244,14 +243,6 @@ test.securityOption=noSecurityManager
junit_jar=/usr/share/lib/java/junit.jar
##
-## Specify where to find the DB2JCC jar files. This property is only
-## required if you test Derby 10.0.2.1, which doesn't have its own
-## network client driver.
-##
-
-db2jcc_lib=/opt/db2jcc/lib
-
-##
## Optional properties to limit the number of combinations to test.
##
## Test only a with a single Derby Network Server version:
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/testScript.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/testScript.xml?rev=1161422&r1=1161421&r2=1161422&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/testScript.xml (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/testScript.xml Thu Aug 25 07:33:01 2011
@@ -34,7 +34,6 @@
This script assumes that you have set the following variables
in the ant.properties file in your user home directory:
- j13lib The library directory of your 1.3 JRE
j14lib The library directory of your 1.4 JRE
jdk15 The JAVA_HOME of your 1.5 vm.
jdk16 The JAVA_HOME of your 1.6 vm.
@@ -56,8 +55,6 @@
10.6.1.0_lib Directory containing the released 10.6.1.0 jars.
trunk_lib Directory containing jars built from the development mainline (trunk).
- db2jcc_lib Directory containing the db2jcc jars (see trunk/java/testing/README.htm).
-
The basic loop runs as follows:
run compatibility tests against current embedded server in all VMs.
@@ -102,11 +99,9 @@
<property name="summaryFile" value="${outDir}/SUMMARY_COMPAT.txt"/>
<property name="databaseName" value="compatDB"/>
- <property name="JCE_JAR" value="${jce1_2_1}"/>
- <property name="TEST_JARS" value="${trunk_lib}/derbyTesting.jar;${junit};${JCE_JAR}"/>
+ <property name="TEST_JARS" value="${trunk_lib}/derbyTesting.jar;${junit}"/>
<!-- legal values of serverVM and clientVM -->
- <property name="VM_1.3" value="${j13lib}/../bin/java"/>
<property name="VM_1.4" value="${j14lib}/../bin/java"/>
<property name="VM_1.5" value="${jdk15}/bin/java"/>
<property name="VM_1.6" value="${jdk16}/bin/java"/>
@@ -130,7 +125,6 @@
<property name="SERVER_TRUNK" value="${trunk_lib}/derby.jar;${trunk_lib}/derbynet.jar;${TEST_JARS}"/>
<!-- legal values of clientClasspath -->
- <property name="CLIENT_DB2JCC" value="${db2jcc_lib}/db2jcc.jar;${db2jcc_lib}/db2jcc_license_c.jar"/>
<property name="CLIENT_10.1.1.0" value="${10.1.1.0_lib}/derbyclient.jar"/>
<property name="CLIENT_10.1.2.1" value="${10.1.2.1_lib}/derbyclient.jar"/>
<property name="CLIENT_10.1.3.1" value="${10.1.3.1_lib}/derbyclient.jar"/>
@@ -149,7 +143,7 @@
<property name="FULL_TRUNK" value="${SERVER_TRUNK};${CLIENT_TRUNK}"/>
- <property name="CLASSPATH_TRUNK" value="${basedir}/classes;${compile.classpath};${jce1_2_1}"/>
+ <property name="CLASSPATH_TRUNK" value="${basedir}/classes;${compile.classpath}"/>
<property name="VM_DEFAULT" value="${VM_1.4}"/>
@@ -201,13 +195,6 @@
<!-- Now loop through server VMs -->
- <!-- JVM 1.3 in client/server mode is not supported on trunk/10.3
- <antcall target="_forServerVM">
- <param name="fsvVM" value="${VM_1.3}"/>
- <param name="fsvName" value="serverVM-1.3"/>
- </antcall>
- -->
-
<antcall target="_forServerVM">
<param name="fsvVM" value="${VM_1.4}"/>
<param name="fsvName" value="serverVM-1.4"/>
@@ -461,13 +448,6 @@
<!-- Now loop through client VMs -->
- <!-- JVM 1.3 in client/server mode is not supported on trunk/10.3
- <antcall target="_forClientVM">
- <param name="fcvVM" value="${VM_1.3}"/>
- <param name="fcvName" value="${fsvnName}_clientVM-1.3"/>
- </antcall>
- -->
-
<antcall target="_forClientVM">
<param name="fcvVM" value="${VM_1.4}"/>
<param name="fcvName" value="${fsvnName}_clientVM-1.4"/>
@@ -581,12 +561,6 @@
<param name="fcvnName" value="${fcvName}_clientDerby10.1.1.0"/>
</antcall>
- <antcall target="_forClientVersion">
- <param name="fcvnVM" value="${fcvVM}"/>
- <param name="fcvnCP" value="${CLIENT_DB2JCC}"/>
- <param name="fcvnName" value="${fcvName}_clientDB2JCC"/>
- </antcall>
-
</target>
<!--
@@ -640,7 +614,7 @@
resultproperty="testStatus"
>
<arg value="-cp"/>
- <arg path="${otClasspath}:${TEST_JARS}:${javatools.dir}/jdbc2_0-stdext.jar"/>
+ <arg path="${otClasspath}:${TEST_JARS}"/>
<arg value="-Ddrb.tests.debug=${drb.tests.debug}"/>
@@ -747,7 +721,7 @@
<target name="_recreateDatabase">
<antcall target="_recreateDatabaseGuts">
- <param name="codeline" value="${CLIENT_DB2JCC}"/>
+ <param name="codeline" value="${CLIENT_10.1.1.0}"/>
</antcall>
</target>
@@ -861,23 +835,6 @@ ${summaryMessage}
<antcall target="_vetClient"> <param name="vcLib" value="${10.6.1.0_lib}"/> </antcall>
<antcall target="_vetClient"> <param name="vcLib" value="${trunk_lib}"/> </antcall>
- <antcall target="_vetDb2Client"/>
-
- </target>
-
- <!-- Check that required db2 client jars are visible -->
- <target name="_vetDb2Client">
-
- <antcall target="_vetJar">
- <param name="vjLib" value="${db2jcc_lib}"/>
- <param name="vjJar" value="db2jcc.jar"/>
- </antcall>
-
- <antcall target="_vetJar">
- <param name="vjLib" value="${db2jcc_lib}"/>
- <param name="vjJar" value="db2jcc_license_c.jar"/>
- </antcall>
-
</target>
<!-- Check that required client jar files are visible -->
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/DerbyJUnitTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/DerbyJUnitTest.java?rev=1161422&r1=1161421&r2=1161422&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/DerbyJUnitTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/DerbyJUnitTest.java Thu Aug 25 07:33:01 2011
@@ -36,8 +36,6 @@ import java.util.*;
import junit.framework.*;
-import org.apache.derby.tools.ij;
-
public class DerbyJUnitTest extends TestCase
{
/////////////////////////////////////////////////////////////
@@ -70,11 +68,10 @@ public class DerbyJUnitTest extends Test
//
// These are properties for the Derby connection URL.
//
- private static final String SERVER_URL = "jdbc:derby://localhost:1527/";
private static final String CREATE_PROPERTY = "create=true";
//
- // Indexes into the array of client-specific strings. E.g., DB2JCC_CLIENT,
+ // Indexes into the array of client-specific strings. E.g.,
// DERBY_CLIENT, and EMBEDDED_CLIENT.
//
public static final int DATABASE_URL = 0;
@@ -82,12 +79,6 @@ public class DerbyJUnitTest extends Test
public static final int FRAMEWORK_NAME = DRIVER_NAME + 1;
// indexed by DATABASE_URL and DRIVER_NAME
- private static final String[] DB2JCC_CLIENT =
- {
- "jdbc:derby:net://localhost:1527/",
- "com.ibm.db2.jcc.DB2Driver",
- "DerbyNet"
- };
private static final String[] DERBY_CLIENT =
{
"jdbc:derby://localhost:1527/",
@@ -103,7 +94,6 @@ public class DerbyJUnitTest extends Test
public static final String[][] LEGAL_CLIENTS =
{
- DB2JCC_CLIENT,
DERBY_CLIENT,
EMBEDDED_CLIENT
};
@@ -121,7 +111,6 @@ public class DerbyJUnitTest extends Test
private static String _databaseName; // sandbox for tests
private static String[] _defaultClientSettings; // one of the clients in
// LEGAL_CLIENTS
- private static boolean _initializedForTestHarness;
/////////////////////////////////////////////////////////////
//
@@ -144,46 +133,6 @@ public class DerbyJUnitTest extends Test
/**
* <p>
- * Run under the old harness.
- * </p>
- */
- public static void runUnderOldHarness( String[] args, Test suite )
- throws Exception
- {
- int exitStatus = FAILURE_EXIT;
-
- initializeForOldHarness( args );
-
- TestResult result = junit.textui.TestRunner.run( suite );
-
- exitStatus = result.errorCount() + result.failureCount();
-
- Runtime.getRuntime().exit( exitStatus );
- }
-
- /**
- * <p>
- * Initialize a test suite to run under the old test harness.
- * </p>
- */
- public static void initializeForOldHarness( String[] args )
- throws Exception
- {
- if ( _initializedForTestHarness ) { return; }
-
- parseDebug();
- setDatabaseName( DEFAULT_DATABASE_NAME );
- findClientFromProperties();
-
- // create database
- ij.getPropertyArg( args );
- Connection conn = ij.startJBMS();
-
- _initializedForTestHarness = true;
- }
-
- /**
- * <p>
* Return true if we're using the embedded driver.
* </p>
*/
@@ -198,13 +147,6 @@ public class DerbyJUnitTest extends Test
/**
* <p>
- * Return true if we're using the db2 client
- * </p>
- */
- public boolean usingDB2Client() { return ( _defaultClientSettings == DB2JCC_CLIENT ); }
-
- /**
- * <p>
* Get the client we're using.
* </p>
*/
@@ -281,44 +223,6 @@ public class DerbyJUnitTest extends Test
}
}
- /**
- * <p>
- * Determine the client to use based on system properties.
- * </p>
- */
- public static void findClientFromProperties()
- throws Exception
- {
- Properties systemProps = System.getProperties();
- String frameworkName = systemProps.getProperty
- ( "framework", EMBEDDED_CLIENT[ FRAMEWORK_NAME ] );
- int count = LEGAL_CLIENTS.length;
-
- for ( int i = 0; i < count; i++ )
- {
- String[] candidate = LEGAL_CLIENTS[ i ];
-
- if ( candidate[ FRAMEWORK_NAME ].equals( frameworkName ) )
- {
- _defaultClientSettings = candidate;
- return;
- }
- }
-
- throw new Exception( "Unrecognized framework: " + frameworkName );
- }
-
- /**
- * <p>
- * Return a meaningful exit status so that calling scripts can take
- * evasive action.
- * </p>
- */
- public void exit( int exitStatus )
- {
- Runtime.getRuntime().exit( exitStatus );
- }
-
/////////////////////////////////////////////////////////////
//
// CONNECTION MANAGEMENT