Deepa Remesh <[EMAIL PROTECTED]> writes:
> Hi,
>
> I have been working on making the upgrade tests run as part of
> derbyall and noticed that there is only one test
> (caseReusableRecordIdSequenceNumber) which has been specifically added
> for 10.2. The javadoc comment for UpgradeTester class lists what is
> tested for 10.1. I think we need a similar list for 10.2 and maybe,
> more tests for any new features.
>
> Andrew mentioned he is working on getting the jars in the repository
> and I am working on using these repository jars and defining a
> standard way to run the test so that it can run as part of derbyall.
> I plan to document this in readme/building.txt once everything is in
> place. For now, to run upgrade tests, we need to pass in the location
> of previous version jar (10.1.2.1) as follows:
> java -Djvmflags=-DderbyTesting.oldJarLocation=<location of 10.1 jars>
> org.apache.derbyTesting.functionTests.harness.RunTest
> upgradeTests/Upgrade_10_1_10_2.java
>
> NOTE: Test runs with jar files in the classpath. It does not run with
> classes folder.
Thanks for doing this :)
However, I would like to request an enhancement. I just tried it, but I
inadvertently supplied the path to the old version using the
shell's ~/ expansion, i.e.
-Djvmflags=-DderbyTesting.oldJarLocation=~/derby-10.1.2.1/db-derby-10.1.2.1-lib/lib
I should have known that this wouldn't work as
java doesn't understand the ~/ syntax, but the failure I got was:
START - phase CREATE
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.derbyTesting.functionTests.tests.upgradeTests.UpgradeTester.getConnectionUsingDataSource(UpgradeTester.java:366)
at
org.apache.derbyTesting.functionTests.tests.upgradeTests.UpgradeTester.getConnection(UpgradeTester.java:325)
at
org.apache.derbyTesting.functionTests.tests.upgradeTests.UpgradeTester.runPhase(UpgradeTester.java:271)
at
org.apache.derbyTesting.functionTests.tests.upgradeTests.UpgradeTester.runUpgradeTests(UpgradeTester.java:229)
at
org.apache.derbyTesting.functionTests.tests.upgradeTests.Upgrade_10_1_10_2.main(Upgrade_10_1_10_2.java:49)
Caused by: java.lang.NoClassDefFoundError:
org/apache/derby/iapi/services/info/JVMInfo
at
org.apache.derbyTesting.functionTests.util.TestUtil.getDataSource(TestUtil.java:313)
... 9 more
Exception: null
I have confirmed that any typo in the property specification causes the
same error.
Would be really nice if the test could verify that the supplied path
is actually valid, and give a reasonable error message if it isn't.
Specifying the location like this:
-Djvmflags=-DderbyTesting.oldJarLocation=/home/dt136804/derby-10.1.2.1/db-derby-10.1.2.1-lib/lib
works just fine. And the test passes :)
--
dt