db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Army <qoz...@sbcglobal.net>
Subject [PATCH] Enhancement to test harness "excludeJCC" property.
Date Mon, 25 Apr 2005 17:48:52 GMT
Currently, the Derby test harness supports an "excludeJCC" property that can be 
used to prevent tests from running against certain versions of the IBM Universal 
Driver.  This property takes a two-part version number and will cause the 
harness to skip a test/suite if the JCC version in use matches or is earlier 
than the version specified by this property.

For example, if the property "excludeJCC=2.0" is specified in 
"<myTest>_app.properties", the harness will skip "myTest" for any versions of 
JCC at or earlier than 2.0.

Attached is a patch that enhances this "excludeJCC" property in two ways:

1) Instead of only allowing exclusion of versions at or earlier than the 
specified version, this patch adds support for two new keywords, "at-or-before" 
and "at-or-after", to allow more control of which versions of JCC are excluded. 
  If neither of these keywords is given, the behavior defaults to the old 
behavior--i.e. the harness will exclude all versions at or earlier than the 
specified version.

For example, if the property "excludeJCC=at-or-after:2.0" is specified in 
"<myTest>_app.properties", the harness will skip "myTest" for any versions of 
JCC at or _later_ than 2.0.

2) Adds a new JVM clause for further narrowing the exclusion criteria.  This 
clause starts with the ",when" tag and is followed by a three-part jvm version. 
  In this case, a test will only be skipped if BOTH the JCC clause AND the jvm 
clause are true. For example:

To skip a test when running with any version of the IBM Universal Driver that is 
2.4 or later, but ONLY if the jvm is 1.3 or earlier:

excludeJCC=at-or-after:2.4,when-at-or-before:jdk1.3.1

To skip a test when running with any version of the IBM Universal Driver that is 
2.0 or earlier, but ONLY if the jvm is 1.5 or later:

excludeJCC=at-or-before:2.0,when-at-or-after:jdk1.5.1

The patch for these two changes is attached to this email.  It includes the 
addition of a short description of these changes in the java/testing/README.htm 
file.  I've also attached that file (README.htm) as a regular attachment so that 
the changes are more easily viewable by any reviewers.

I've tried to make these changes in a modular way so that if a similar property 
is ever created for the new Derby Client, this same code can be used.

svn stat:

M      java\testing\README.htm
M      java\testing\org\apache\derbyTesting\functionTests\harness\RunList.java
M      java\testing\org\apache\derbyTesting\functionTests\harness\RunTest.java
M 
java\testing\org\apache\derbyTesting\functionTests\suites\derbynetmats.properties

I've run the complete "derbyall" suite twice with this patch (using different 
versions of JCC and different JVMs) on Windows, and all tests ran/passed as 
expected.

Army

Mime
View raw message