[ 
https://issues.apache.org/jira/browse/DERBY-5475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kristian Waagan updated DERBY-5475:
-----------------------------------

    Attachment: derby-5475-3a-repository.diff

Attaching patch 3a, which adds two classes:

** junit/DerbyDistribution
A class representing a Derby distribution on disk. Has a set of convenience 
methods to work with the distribution, i.e. getting the paths to various 
JAR-files and the version.
It only supports distributions based off JARs. It is not problematic to add 
support for classes-based distributions, but using such distributions in tests 
is more complicated due to various classpath issues. For instance, some tests 
require that you only add the client code. I suspect further problems like 
classpath shadowing and possibly sealing violations.

** junit/ReleaseRepository
Builds a list of distributions found in a directory on disk.
This repository does nothing to fetch or verify that the directory on disk 
contains a recent set of releases. It's up to the user to keep the directory 
updated, and up to the tests using the repository to require specific releases 
etc.
The repository will look in a default location ($HOME/.derbyTestingReleases), 
but this can by overridden by specifying derbyTesting.oldReleasePath. That 
property is already used by existing tests.


Patch ready for review.
                
> Formalize use of old Derby distributions in tests
> -------------------------------------------------
>
>                 Key: DERBY-5475
>                 URL: https://issues.apache.org/jira/browse/DERBY-5475
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>    Affects Versions: 10.9.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>         Attachments: derby-5475-1a-DerbyVersion.diff, 
> derby-5475-1b-DerbyVersion.diff, derby-5475-2a-rename_and_cleanup.diff, 
> derby-5475-2a-rename_and_cleanup.stat, derby-5475-3a-repository.diff
>
>
> Some types of tests need old Derby distributions to perform the required 
> actions. Currently this includes the upgrade test and the compatibility test.
> Instead of each test dealing with this in their own way, there should be 
> support for accessing old Derby distributions in the test framework.
> I propose to add a Derby distribution repository in the test framework, with 
> the following guidelines and changes:
>  o keep it as simple as possible, which suggests it is the users 
> responsibility to keep the repository updated
>  o compatibility with the existing derbyTesting.oldReleasePath property
>  o make the tests requiring old distributions fail if there are no 
> distributions available
>  o establish a default location where the test framework will look for old 
> distributions if derbyTesting.oldReleasePath is unspecified
>  o the repository should not incur any costs when not used by the test(s) 
> being run
> In favor of simplicity the repository will not download releases itself. The 
> user has to keep the repository contents up-to-date, which is as simple as 
> running 'svn up' each time a new Derby release is published. It is unclear 
> if, and what, the repository and/or relevant tests should do if the 
> repository is outdated. It seems useful to allow the user to make available 
> only a subset of the distributions, but maybe printing a warning is helpful 
> to remind developers that their repository is stale.
> Another related issue, which will only be relevant some time in the future, 
> is whether a test framework of version X should make available distributions 
> of version X+n. Currently I'm leaning towards not doing that, but haven't 
> really looked into it.
> See also thread on derby-dev: http://db.markmail.org/thread/44uyusa726cwjuk2

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to