db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Db-derby Wiki] Update of "TestingOldClientNewServer" by BryanPendleton
Date Fri, 30 Jun 2006 02:18:27 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Db-derby Wiki" for change notification.

The following page has been changed by BryanPendleton:
http://wiki.apache.org/db-derby/TestingOldClientNewServer

The comment on the change is:
Sunitha's discovery about jar locations and security policy

------------------------------------------------------------------------------
  When making a change to the Network Server code, it is useful to be able to verify that
the change does not break old clients. Here is one technique you can use:
  
-  * Modify your classpath so that it specifies the 10.1 version of the derbytesting.jar and
derbyclient.jar files. You can find these files in your subversion tree in the {{{trunk/tools/testing/derby/10.1}}}
directory
+  * Modify your classpath so that it specifies the 10.1 version of the derbytesting.jar and
derbyclient.jar files. You can find these files in your subversion tree in the {{{trunk/tools/testing/derby/10.1}}}
directory. It is best to copy these files to the same directory as your 10.2 jars; see below
for why this is important.
   * The rest of your classpath should still point to the 10.2 code you are testing.
   * Run the derbynetclientmats suite using the command {{{java org.apache.derbyTesting.functionTests.harness.RunSuite
derbynetclientmats}}}
  
  There may be diffs when you do this, related to changes to the new release which are known
to cause compatibility problems with the previous client code. If you have trouble understanding
the diffs, post a message to the developers list and some of the other Derby developers will
be glad to help you interpret the diffs.
  
+ == Jar file location and security policy ==
+ 
+ Note that the security policy file grants permissions to read all property for derbytesting.jar
in both 10.1 and 10.2, so ideally access to properties should work for code from both sets
of jars. However, if you leave the jars in separate directories, and simply update your classpath
to refer to 10.1 jars in one location and 10.2 jars in another location, that won't work in
our harness.
+ 
+ The symptom is that you will see test differences referring to permission denied errors.
+ 
+ For example, suppose the 10.2 derby.jar and derbynet.jar were before any of the other jars.
When you run the test, it sets the 'csinfo.codejar' as the location for the jar files and
the derby_tests.policy file expects that the 10.1 derbyTesting.jar and derbytools.jar etc
are all in the same directory as derbynet.jar. But it picked up the csinfo.codejar as the
location where the 10.2 derbynet.jar was and thus the policy file was not granting permission
to your 10.1 jars that were in the classpath and hence the exception.
+ 
+ To fix this, the simplest technique is to place the 10.1 derbyclient.jar and 10.1 derbyTesting.jar
in the same directory location where the other derbynet.jar and derby.jar are, and then permissions
will be granted correctly and test passes.
+ 

Mime
View raw message