You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-dev@db.apache.org by karan malhi <ka...@gmail.com> on 2005/09/13 03:59:55 UTC
JDO-131 patch (updated)
Here is the patch for JDO-131 incorporating Craig and Michael's
recommendations.
--
Karan Singh
Re: JDO-131 patch (updated)
Posted by karan malhi <ka...@gmail.com>.
Hi Craig,
Will fix that. Michael pointed out the same to me regarding spaces and
tabs and i thought that i had set my editor to use spaces instead, for
some reason it is still putting tabs .
I did accidentally delete the line -Djdo.tck.identitytypes. I should
have reverted back , updated the file with the entry and then provided
the patch. Will be more careful next time.
Craig Russell wrote:
> Hi Karan,
>
> Looks good. Some minor comments:
>
> 1. Typo contaninig
>
> 2. Use spaces instead of tabs for indenting code.
>
> 3. You seem to have changed the indenting or something on the <echo>
> -Djdo.tck.identitytypes line. The diff shows the line being deleted
> and inserted.
>
> Thanks,
>
> Craig
>
> On Sep 12, 2005, at 6:59 PM, karan malhi wrote:
>
>> Here is the patch for JDO-131 incorporating Craig and Michael's
>> recommendations.
>>
>> --
>> Karan Singh
>>
>> Index:
>> C:/ApacheJDO/trunk/tck20/test/java/org/apache/jdo/tck/JDO_Test.java
>> ===================================================================
>> ---
>> C:/ApacheJDO/trunk/tck20/test/java/org/apache/jdo/tck/JDO_Test.java
>> (revision 279926)
>> +++
>> C:/ApacheJDO/trunk/tck20/test/java/org/apache/jdo/tck/JDO_Test.java
>> (working copy)
>> @@ -137,6 +137,13 @@
>> /** Name of the file contaninig the properties for the PMF. */
>> protected static String PMFProperties =
>> System.getProperty("PMFProperties");
>>
>> + /** String indicating whether to clean up data after tests or
>> not. The value can be either
>> + * "true" or "false". If "false" then test will not clean up
>> data from database.
>> + * The default value is "true".
>> + */
>> + protected static boolean cleanupData =
>> + System.getProperty("jdo.tck.cleanupaftertest",
>> "true").equalsIgnoreCase("true");
>> +
>> /** The Properties object for the PersistenceManagerFactory. */
>> protected static Properties PMFPropertiesObject;
>>
>> @@ -260,7 +267,9 @@
>> pmf = null;
>>
>> try {
>> - localTearDown();
>> + if (cleanupData) {
>> + localTearDown();
>> + }
>> }
>> catch (Throwable t) {
>> setTearDownThrowable("localTearDown", t);
>> Index: C:/ApacheJDO/trunk/tck20/maven.xml
>> ===================================================================
>> --- C:/ApacheJDO/trunk/tck20/maven.xml (revision 279926)
>> +++ C:/ApacheJDO/trunk/tck20/maven.xml (working copy)
>> @@ -41,7 +41,8 @@
>> <echo>Options for this project are:</echo>
>> <echo> -Djdo.tck.cfglist=xxx - a list of configuration
>> files (must be in test/conf)</echo>
>> <echo> -Djdo.tck.dblist=xxx - a list of databases</echo>
>> - <echo> -Djdo.tck.identitytypes=xxx - a list of identity
>> types (applicationidentity, datastoreidentity)</echo>
>> + <echo> -Djdo.tck.identitytypes=xxx - a list of identity types
>> (applicationidentity, datastoreidentity)</echo>
>> + <echo> -Djdo.tck.cleanupaftertest=xxx - true/false. Setting it
>> to false will retain data in database after test. This will allow
>> inspection of data after test is run. Default is true</echo>
>> <echo></echo>
>> <echo>Examples:</echo>
>> <echo> maven -Djdo.tck.identitytypes=datastoreidentity
>> installSchema</echo>
>> @@ -314,6 +315,8 @@
>> value="${jdo.tck.exclude}"/>
>> <sysproperty key="jdo.tck.log.directory"
>> value="${jdo.tck.log.directory}/${timestamp}"/>
>> + <sysproperty key="jdo.tck.cleanupaftertest"
>> + value="${jdo.tck.cleanupaftertest}"/>
>> <jvmarg line="${database.runtck.sysproperties}"/>
>> <jvmarg line="${iut.runtck.sysproperties}"/>
>> <arg line="${jdo.tck.classes}"/>
>> @@ -361,6 +364,8 @@
>> value="${jdo.tck.exclude}"/>
>> <sysproperty key="jdo.tck.log.directory"
>> value="${jdo.tck.log.directory}/${timestamp}"/>
>> + <sysproperty key="jdo.tck.cleanupaftertest"
>> + value="${jdo.tck.cleanupaftertest}"/>
>> <jvmarg line="${database.runtck.sysproperties}"/>
>> <jvmarg line="${jdo.runtck.sysproperties}"/>
>> <arg line="${jdo.tck.classes}"/>
>> Index: C:/ApacheJDO/trunk/tck20/project.properties
>> ===================================================================
>> --- C:/ApacheJDO/trunk/tck20/project.properties (revision 279926)
>> +++ C:/ApacheJDO/trunk/tck20/project.properties (working copy)
>> @@ -42,7 +42,8 @@
>> maven.junit.dir = ${jdo.tck.testdir}
>> maven.junit.sysproperties = PMFProperties
>> PMFProperties = jdori.properties
>> -
>> +# Setting this property to false will turn off cleanup of data from
>> database to inspect database contents after test run
>> +jdo.tck.cleanupaftertest = true
>> # JDO TCK settings
>> jdo.tck.dblist=derby
>> jdo.tck.identitytypes=applicationidentity datastoreidentity
>>
>
> Craig Russell
>
> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
>
> 408 276-5638 mailto:Craig.Russell@sun.com
>
> P.S. A good JDO? O, Gasp!
>
>
--
Karan Singh
Re: JDO-131 patch (updated)
Posted by Michael Bouschen <mb...@spree.de>.
Hi Karan,
sorry, I did not know that you cannot update the status of an issue.
I resolved the issue and set it to fixed.
Regards Michael
> Hi Michael,
>
> Just when i thought i fixed everything in the patch, the javadoc went
> unnoticed :).
> Since i dont have rights to update the status of an issue, I have added the
> comment to JDO-131 that it is FIXED.
>
> On 9/13/05, Michael Bouschen <mb...@spree.de> wrote:
>
[...]
--
Michael Bouschen Tech@Spree Engineering GmbH
mailto:mbo.tech@spree.de http://www.tech.spree.de/
Tel.:++49/30/235 520-33 Buelowstr. 66
Fax.:++49/30/2175 2012 D-10783 Berlin
Re: JDO-131 patch (updated)
Posted by Karan Malhi <ka...@gmail.com>.
Hi Michael,
Just when i thought i fixed everything in the patch, the javadoc went
unnoticed :).
Since i dont have rights to update the status of an issue, I have added the
comment to JDO-131 that it is FIXED.
On 9/13/05, Michael Bouschen <mb...@spree.de> wrote:
>
> Hi Karan,
>
> thanks for the patch! I checked it in today.
>
> I adapted the javadoc for the new field cleanupData, since it was still
> talking about a String field. I also removed the tabs from the JDO_Test
> changes.
>
> Do you plan to set JDO-131 to fixed?
>
> Regards Michael
>
> > Hi Craig,
> > Resubmitting the patch. Fixed the typo, removed tabs and reverted back
> > the <echo> -Djdo.tck.identitytypes line.
> >
> > Craig Russell wrote:
> >
> >> Hi Karan,
> >>
> >> Looks good. Some minor comments:
> >>
> >> 1. Typo contaninig
> >>
> >> 2. Use spaces instead of tabs for indenting code.
> >>
> >> 3. You seem to have changed the indenting or something on the <echo>
> >> -Djdo.tck.identitytypes line. The diff shows the line being deleted
> >> and inserted.
> >>
> >> Thanks,
> >>
> >> Craig
> >>
> >> On Sep 12, 2005, at 6:59 PM, karan malhi wrote:
> >>
> >>> Here is the patch for JDO-131 incorporating Craig and Michael's
> >>> recommendations.
> >>>
> >>> --
> >>> Karan Singh
> >>>
> >>> Index:
> >>> C:/ApacheJDO/trunk/tck20/test/java/org/apache/jdo/tck/JDO_Test.java
> >>> ===================================================================
> >>> ---
> >>> C:/ApacheJDO/trunk/tck20/test/java/org/apache/jdo/tck/JDO_Test.java
> >>> (revision 279926)
> >>> +++
> >>> C:/ApacheJDO/trunk/tck20/test/java/org/apache/jdo/tck/JDO_Test.java
> >>> (working copy)
> >>> @@ -137,6 +137,13 @@
> >>> /** Name of the file contaninig the properties for the PMF. */
> >>> protected static String PMFProperties =
> >>> System.getProperty("PMFProperties");
> >>>
> >>> + /** String indicating whether to clean up data after tests or
> >>> not. The value can be either
> >>> + * "true" or "false". If "false" then test will not clean up
> >>> data from database.
> >>> + * The default value is "true".
> >>> + */
> >>> + protected static boolean cleanupData = +
> >>> System.getProperty("jdo.tck.cleanupaftertest",
> >>> "true").equalsIgnoreCase("true");
> >>> + /** The Properties object for the
> >>> PersistenceManagerFactory. */
> >>> protected static Properties PMFPropertiesObject;
> >>>
> >>> @@ -260,7 +267,9 @@
> >>> pmf = null;
> >>>
> >>> try {
> >>> - localTearDown();
> >>> + if (cleanupData) {
> >>> + localTearDown();
> >>> + }
> >>> } catch (Throwable t) {
> >>> setTearDownThrowable("localTearDown", t);
> >>> Index: C:/ApacheJDO/trunk/tck20/maven.xml
> >>> ===================================================================
> >>> --- C:/ApacheJDO/trunk/tck20/maven.xml (revision 279926)
> >>> +++ C:/ApacheJDO/trunk/tck20/maven.xml (working copy)
> >>> @@ -41,7 +41,8 @@
> >>> <echo>Options for this project are:</echo>
> >>> <echo> -Djdo.tck.cfglist=xxx - a list of configuration
> >>> files (must be in test/conf)</echo>
> >>> <echo> -Djdo.tck.dblist=xxx - a list of databases</echo>
> >>> - <echo> -Djdo.tck.identitytypes=xxx - a list of identity
> >>> types (applicationidentity, datastoreidentity)</echo>
> >>> + <echo> -Djdo.tck.identitytypes=xxx - a list of identity types
> >>> (applicationidentity, datastoreidentity)</echo>
> >>> + <echo> -Djdo.tck.cleanupaftertest=xxx - true/false. Setting it
> >>> to false will retain data in database after test. This will allow
> >>> inspection of data after test is run. Default is true</echo>
> >>> <echo></echo>
> >>> <echo>Examples:</echo>
> >>> <echo> maven -Djdo.tck.identitytypes=datastoreidentity
> >>> installSchema</echo>
> >>> @@ -314,6 +315,8 @@
> >>> value="${jdo.tck.exclude}"/>
> >>> <sysproperty key="jdo.tck.log.directory"
> >>>
> >>> value="${jdo.tck.log.directory}/${timestamp}"/>
> >>> + <sysproperty key="jdo.tck.cleanupaftertest"
> >>> + value="${jdo.tck.cleanupaftertest}"/>
> >>> <jvmarg line="${database.runtck.sysproperties}"/>
> >>> <jvmarg line="${iut.runtck.sysproperties}"/>
> >>> <arg line="${jdo.tck.classes}"/>
> >>> @@ -361,6 +364,8 @@
> >>> value="${jdo.tck.exclude}"/>
> >>> <sysproperty key="jdo.tck.log.directory"
> >>>
> >>> value="${jdo.tck.log.directory}/${timestamp}"/>
> >>> + <sysproperty key="jdo.tck.cleanupaftertest"
> >>> + value="${jdo.tck.cleanupaftertest}"/>
> >>> <jvmarg line="${database.runtck.sysproperties}"/>
> >>> <jvmarg line="${jdo.runtck.sysproperties}"/>
> >>> <arg line="${jdo.tck.classes}"/>
> >>> Index: C:/ApacheJDO/trunk/tck20/project.properties
> >>> ===================================================================
> >>> --- C:/ApacheJDO/trunk/tck20/project.properties (revision 279926)
> >>> +++ C:/ApacheJDO/trunk/tck20/project.properties (working copy)
> >>> @@ -42,7 +42,8 @@
> >>> maven.junit.dir = ${jdo.tck.testdir}
> >>> maven.junit.sysproperties = PMFProperties
> >>> PMFProperties = jdori.properties
> >>> -
> >>> +# Setting this property to false will turn off cleanup of data from
> >>> database to inspect database contents after test run
> >>> +jdo.tck.cleanupaftertest = true
> >>> # JDO TCK settings
> >>> jdo.tck.dblist=derby
> >>> jdo.tck.identitytypes=applicationidentity datastoreidentity
> >>>
> >>
> >> Craig Russell
> >>
> >> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
> >>
> >> 408 276-5638 mailto:Craig.Russell@sun.com
> >>
> >> P.S. A good JDO? O, Gasp!
> >>
> >>
> >
> >
> > ------------------------------------------------------------------------
> >
> > Index: C:/ApacheJDO/trunk/tck20/project.properties
> > ===================================================================
> > --- C:/ApacheJDO/trunk/tck20/project.properties (revision 279926)
> > +++ C:/ApacheJDO/trunk/tck20/project.properties (working copy)
> > @@ -42,7 +42,8 @@
> > maven.junit.dir = ${jdo.tck.testdir}
> > maven.junit.sysproperties = PMFProperties
> > PMFProperties = jdori.properties
> > -
> > +# Setting this property to false will turn off cleanup of data from
> database to inspect database contents after test run
> > +jdo.tck.cleanupaftertest = true
> > # JDO TCK settings
> > jdo.tck.dblist=derby
> > jdo.tck.identitytypes=applicationidentity datastoreidentity
> >
> >
> > ------------------------------------------------------------------------
> >
> > Index: C:/ApacheJDO/trunk/tck20/maven.xml
> > ===================================================================
> > --- C:/ApacheJDO/trunk/tck20/maven.xml (revision 279926)
> > +++ C:/ApacheJDO/trunk/tck20/maven.xml (working copy)
> > @@ -42,6 +42,7 @@
> > <echo> -Djdo.tck.cfglist=xxx - a list of configuration files (must be in
> test/conf)</echo>
> > <echo> -Djdo.tck.dblist=xxx - a list of databases</echo>
> > <echo> -Djdo.tck.identitytypes=xxx - a list of identity types
> (applicationidentity, datastoreidentity)</echo>
> > + <echo> -Djdo.tck.cleanupaftertest=xxx - true/false. Setting it to
> false will retain data in database after test. This will allow inspection of
> data after test is run. Default is true</echo>
> > <echo></echo>
> > <echo>Examples:</echo>
> > <echo> maven -Djdo.tck.identitytypes=datastoreidentityinstallSchema</echo>
> > @@ -314,6 +315,8 @@
> > value="${jdo.tck.exclude}"/>
> > <sysproperty key="jdo.tck.log.directory"
> > value="${jdo.tck.log.directory}/${timestamp}"/>
> > + <sysproperty key="jdo.tck.cleanupaftertest"
> > + value="${jdo.tck.cleanupaftertest}"/>
> > <jvmarg line="${database.runtck.sysproperties}"/>
> > <jvmarg line="${iut.runtck.sysproperties}"/>
> > <arg line="${jdo.tck.classes}"/>
> > @@ -361,6 +364,8 @@
> > value="${jdo.tck.exclude}"/>
> > <sysproperty key="jdo.tck.log.directory"
> > value="${jdo.tck.log.directory}/${timestamp}"/>
> > + <sysproperty key="jdo.tck.cleanupaftertest"
> > + value="${jdo.tck.cleanupaftertest}"/>
> > <jvmarg line="${database.runtck.sysproperties}"/>
> > <jvmarg line="${jdo.runtck.sysproperties}"/>
> > <arg line="${jdo.tck.classes}"/>
> >
> >
> > ------------------------------------------------------------------------
> >
> > Index:
> C:/ApacheJDO/trunk/tck20/test/java/org/apache/jdo/tck/JDO_Test.java
> > ===================================================================
> > --- C:/ApacheJDO/trunk/tck20/test/java/org/apache/jdo/tck/JDO_Test.java
> (revision 279926)
> > +++ C:/ApacheJDO/trunk/tck20/test/java/org/apache/jdo/tck/JDO_Test.java
> (working copy)
> > @@ -134,9 +134,16 @@
> > */
> > protected final String identitytype = System.getProperty("
> jdo.tck.identitytype");
> >
> > - /** Name of the file contaninig the properties for the PMF. */
> > + /** Name of the file containing the properties for the PMF. */
> > protected static String PMFProperties = System.getProperty
> ("PMFProperties");
> >
> > + /** String indicating whether to clean up data after tests or not. The
> value can be either
> > + * "true" or "false". If "false" then test will not clean up data from
> database.
> > + * The default value is "true".
> > + */
> > + protected static boolean cleanupData =
> > + System.getProperty("jdo.tck.cleanupaftertest",
> "true").equalsIgnoreCase("true");
> > +
> > /** The Properties object for the PersistenceManagerFactory. */
> > protected static Properties PMFPropertiesObject;
> >
> > @@ -260,7 +267,9 @@
> > pmf = null;
> >
> > try {
> > - localTearDown();
> > + if (cleanupData) {
> > + localTearDown();
> > + }
> > }
> > catch (Throwable t) {
> > setTearDownThrowable("localTearDown", t);
>
>
> --
> Michael Bouschen Tech@Spree Engineering GmbH
> mailto:mbo.tech@spree.de http://www.tech.spree.de/
> Tel.:++49/30/235 520-33 Buelowstr. 66
> Fax.:++49/30/2175 2012 D-10783 Berlin
>
>
>
--
Karan Malhi
Re: JDO-131 patch (updated)
Posted by Michael Bouschen <mb...@spree.de>.
Hi Karan,
thanks for the patch! I checked it in today.
I adapted the javadoc for the new field cleanupData, since it was still
talking about a String field. I also removed the tabs from the JDO_Test
changes.
Do you plan to set JDO-131 to fixed?
Regards Michael
> Hi Craig,
> Resubmitting the patch. Fixed the typo, removed tabs and reverted back
> the <echo> -Djdo.tck.identitytypes line.
>
> Craig Russell wrote:
>
>> Hi Karan,
>>
>> Looks good. Some minor comments:
>>
>> 1. Typo contaninig
>>
>> 2. Use spaces instead of tabs for indenting code.
>>
>> 3. You seem to have changed the indenting or something on the <echo>
>> -Djdo.tck.identitytypes line. The diff shows the line being deleted
>> and inserted.
>>
>> Thanks,
>>
>> Craig
>>
>> On Sep 12, 2005, at 6:59 PM, karan malhi wrote:
>>
>>> Here is the patch for JDO-131 incorporating Craig and Michael's
>>> recommendations.
>>>
>>> --
>>> Karan Singh
>>>
>>> Index:
>>> C:/ApacheJDO/trunk/tck20/test/java/org/apache/jdo/tck/JDO_Test.java
>>> ===================================================================
>>> ---
>>> C:/ApacheJDO/trunk/tck20/test/java/org/apache/jdo/tck/JDO_Test.java
>>> (revision 279926)
>>> +++
>>> C:/ApacheJDO/trunk/tck20/test/java/org/apache/jdo/tck/JDO_Test.java
>>> (working copy)
>>> @@ -137,6 +137,13 @@
>>> /** Name of the file contaninig the properties for the PMF. */
>>> protected static String PMFProperties =
>>> System.getProperty("PMFProperties");
>>>
>>> + /** String indicating whether to clean up data after tests or
>>> not. The value can be either
>>> + * "true" or "false". If "false" then test will not clean up
>>> data from database.
>>> + * The default value is "true".
>>> + */
>>> + protected static boolean cleanupData = +
>>> System.getProperty("jdo.tck.cleanupaftertest",
>>> "true").equalsIgnoreCase("true");
>>> + /** The Properties object for the
>>> PersistenceManagerFactory. */
>>> protected static Properties PMFPropertiesObject;
>>>
>>> @@ -260,7 +267,9 @@
>>> pmf = null;
>>>
>>> try {
>>> - localTearDown();
>>> + if (cleanupData) {
>>> + localTearDown();
>>> + }
>>> } catch (Throwable t) {
>>> setTearDownThrowable("localTearDown", t);
>>> Index: C:/ApacheJDO/trunk/tck20/maven.xml
>>> ===================================================================
>>> --- C:/ApacheJDO/trunk/tck20/maven.xml (revision 279926)
>>> +++ C:/ApacheJDO/trunk/tck20/maven.xml (working copy)
>>> @@ -41,7 +41,8 @@
>>> <echo>Options for this project are:</echo>
>>> <echo> -Djdo.tck.cfglist=xxx - a list of configuration
>>> files (must be in test/conf)</echo>
>>> <echo> -Djdo.tck.dblist=xxx - a list of databases</echo>
>>> - <echo> -Djdo.tck.identitytypes=xxx - a list of identity
>>> types (applicationidentity, datastoreidentity)</echo>
>>> + <echo> -Djdo.tck.identitytypes=xxx - a list of identity types
>>> (applicationidentity, datastoreidentity)</echo>
>>> + <echo> -Djdo.tck.cleanupaftertest=xxx - true/false. Setting it
>>> to false will retain data in database after test. This will allow
>>> inspection of data after test is run. Default is true</echo>
>>> <echo></echo>
>>> <echo>Examples:</echo>
>>> <echo> maven -Djdo.tck.identitytypes=datastoreidentity
>>> installSchema</echo>
>>> @@ -314,6 +315,8 @@
>>> value="${jdo.tck.exclude}"/>
>>> <sysproperty key="jdo.tck.log.directory"
>>>
>>> value="${jdo.tck.log.directory}/${timestamp}"/>
>>> + <sysproperty key="jdo.tck.cleanupaftertest"
>>> + value="${jdo.tck.cleanupaftertest}"/>
>>> <jvmarg line="${database.runtck.sysproperties}"/>
>>> <jvmarg line="${iut.runtck.sysproperties}"/>
>>> <arg line="${jdo.tck.classes}"/>
>>> @@ -361,6 +364,8 @@
>>> value="${jdo.tck.exclude}"/>
>>> <sysproperty key="jdo.tck.log.directory"
>>>
>>> value="${jdo.tck.log.directory}/${timestamp}"/>
>>> + <sysproperty key="jdo.tck.cleanupaftertest"
>>> + value="${jdo.tck.cleanupaftertest}"/>
>>> <jvmarg line="${database.runtck.sysproperties}"/>
>>> <jvmarg line="${jdo.runtck.sysproperties}"/>
>>> <arg line="${jdo.tck.classes}"/>
>>> Index: C:/ApacheJDO/trunk/tck20/project.properties
>>> ===================================================================
>>> --- C:/ApacheJDO/trunk/tck20/project.properties (revision 279926)
>>> +++ C:/ApacheJDO/trunk/tck20/project.properties (working copy)
>>> @@ -42,7 +42,8 @@
>>> maven.junit.dir = ${jdo.tck.testdir}
>>> maven.junit.sysproperties = PMFProperties
>>> PMFProperties = jdori.properties
>>> -
>>> +# Setting this property to false will turn off cleanup of data from
>>> database to inspect database contents after test run
>>> +jdo.tck.cleanupaftertest = true
>>> # JDO TCK settings
>>> jdo.tck.dblist=derby
>>> jdo.tck.identitytypes=applicationidentity datastoreidentity
>>>
>>
>> Craig Russell
>>
>> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
>>
>> 408 276-5638 mailto:Craig.Russell@sun.com
>>
>> P.S. A good JDO? O, Gasp!
>>
>>
>
>
> ------------------------------------------------------------------------
>
> Index: C:/ApacheJDO/trunk/tck20/project.properties
> ===================================================================
> --- C:/ApacheJDO/trunk/tck20/project.properties (revision 279926)
> +++ C:/ApacheJDO/trunk/tck20/project.properties (working copy)
> @@ -42,7 +42,8 @@
> maven.junit.dir = ${jdo.tck.testdir}
> maven.junit.sysproperties = PMFProperties
> PMFProperties = jdori.properties
> -
> +# Setting this property to false will turn off cleanup of data from database to inspect database contents after test run
> +jdo.tck.cleanupaftertest = true
> # JDO TCK settings
> jdo.tck.dblist=derby
> jdo.tck.identitytypes=applicationidentity datastoreidentity
>
>
> ------------------------------------------------------------------------
>
> Index: C:/ApacheJDO/trunk/tck20/maven.xml
> ===================================================================
> --- C:/ApacheJDO/trunk/tck20/maven.xml (revision 279926)
> +++ C:/ApacheJDO/trunk/tck20/maven.xml (working copy)
> @@ -42,6 +42,7 @@
> <echo> -Djdo.tck.cfglist=xxx - a list of configuration files (must be in test/conf)</echo>
> <echo> -Djdo.tck.dblist=xxx - a list of databases</echo>
> <echo> -Djdo.tck.identitytypes=xxx - a list of identity types (applicationidentity, datastoreidentity)</echo>
> + <echo> -Djdo.tck.cleanupaftertest=xxx - true/false. Setting it to false will retain data in database after test. This will allow inspection of data after test is run. Default is true</echo>
> <echo></echo>
> <echo>Examples:</echo>
> <echo> maven -Djdo.tck.identitytypes=datastoreidentity installSchema</echo>
> @@ -314,6 +315,8 @@
> value="${jdo.tck.exclude}"/>
> <sysproperty key="jdo.tck.log.directory"
> value="${jdo.tck.log.directory}/${timestamp}"/>
> + <sysproperty key="jdo.tck.cleanupaftertest"
> + value="${jdo.tck.cleanupaftertest}"/>
> <jvmarg line="${database.runtck.sysproperties}"/>
> <jvmarg line="${iut.runtck.sysproperties}"/>
> <arg line="${jdo.tck.classes}"/>
> @@ -361,6 +364,8 @@
> value="${jdo.tck.exclude}"/>
> <sysproperty key="jdo.tck.log.directory"
> value="${jdo.tck.log.directory}/${timestamp}"/>
> + <sysproperty key="jdo.tck.cleanupaftertest"
> + value="${jdo.tck.cleanupaftertest}"/>
> <jvmarg line="${database.runtck.sysproperties}"/>
> <jvmarg line="${jdo.runtck.sysproperties}"/>
> <arg line="${jdo.tck.classes}"/>
>
>
> ------------------------------------------------------------------------
>
> Index: C:/ApacheJDO/trunk/tck20/test/java/org/apache/jdo/tck/JDO_Test.java
> ===================================================================
> --- C:/ApacheJDO/trunk/tck20/test/java/org/apache/jdo/tck/JDO_Test.java (revision 279926)
> +++ C:/ApacheJDO/trunk/tck20/test/java/org/apache/jdo/tck/JDO_Test.java (working copy)
> @@ -134,9 +134,16 @@
> */
> protected final String identitytype = System.getProperty("jdo.tck.identitytype");
>
> - /** Name of the file contaninig the properties for the PMF. */
> + /** Name of the file containing the properties for the PMF. */
> protected static String PMFProperties = System.getProperty("PMFProperties");
>
> + /** String indicating whether to clean up data after tests or not. The value can be either
> + * "true" or "false". If "false" then test will not clean up data from database.
> + * The default value is "true".
> + */
> + protected static boolean cleanupData =
> + System.getProperty("jdo.tck.cleanupaftertest", "true").equalsIgnoreCase("true");
> +
> /** The Properties object for the PersistenceManagerFactory. */
> protected static Properties PMFPropertiesObject;
>
> @@ -260,7 +267,9 @@
> pmf = null;
>
> try {
> - localTearDown();
> + if (cleanupData) {
> + localTearDown();
> + }
> }
> catch (Throwable t) {
> setTearDownThrowable("localTearDown", t);
--
Michael Bouschen Tech@Spree Engineering GmbH
mailto:mbo.tech@spree.de http://www.tech.spree.de/
Tel.:++49/30/235 520-33 Buelowstr. 66
Fax.:++49/30/2175 2012 D-10783 Berlin
Re: JDO-131 patch (updated)
Posted by karan malhi <ka...@gmail.com>.
Hi Craig,
Resubmitting the patch. Fixed the typo, removed tabs and reverted back
the <echo> -Djdo.tck.identitytypes line.
Craig Russell wrote:
> Hi Karan,
>
> Looks good. Some minor comments:
>
> 1. Typo contaninig
>
> 2. Use spaces instead of tabs for indenting code.
>
> 3. You seem to have changed the indenting or something on the <echo>
> -Djdo.tck.identitytypes line. The diff shows the line being deleted
> and inserted.
>
> Thanks,
>
> Craig
>
> On Sep 12, 2005, at 6:59 PM, karan malhi wrote:
>
>> Here is the patch for JDO-131 incorporating Craig and Michael's
>> recommendations.
>>
>> --
>> Karan Singh
>>
>> Index:
>> C:/ApacheJDO/trunk/tck20/test/java/org/apache/jdo/tck/JDO_Test.java
>> ===================================================================
>> ---
>> C:/ApacheJDO/trunk/tck20/test/java/org/apache/jdo/tck/JDO_Test.java
>> (revision 279926)
>> +++
>> C:/ApacheJDO/trunk/tck20/test/java/org/apache/jdo/tck/JDO_Test.java
>> (working copy)
>> @@ -137,6 +137,13 @@
>> /** Name of the file contaninig the properties for the PMF. */
>> protected static String PMFProperties =
>> System.getProperty("PMFProperties");
>>
>> + /** String indicating whether to clean up data after tests or
>> not. The value can be either
>> + * "true" or "false". If "false" then test will not clean up
>> data from database.
>> + * The default value is "true".
>> + */
>> + protected static boolean cleanupData =
>> + System.getProperty("jdo.tck.cleanupaftertest",
>> "true").equalsIgnoreCase("true");
>> +
>> /** The Properties object for the PersistenceManagerFactory. */
>> protected static Properties PMFPropertiesObject;
>>
>> @@ -260,7 +267,9 @@
>> pmf = null;
>>
>> try {
>> - localTearDown();
>> + if (cleanupData) {
>> + localTearDown();
>> + }
>> }
>> catch (Throwable t) {
>> setTearDownThrowable("localTearDown", t);
>> Index: C:/ApacheJDO/trunk/tck20/maven.xml
>> ===================================================================
>> --- C:/ApacheJDO/trunk/tck20/maven.xml (revision 279926)
>> +++ C:/ApacheJDO/trunk/tck20/maven.xml (working copy)
>> @@ -41,7 +41,8 @@
>> <echo>Options for this project are:</echo>
>> <echo> -Djdo.tck.cfglist=xxx - a list of configuration
>> files (must be in test/conf)</echo>
>> <echo> -Djdo.tck.dblist=xxx - a list of databases</echo>
>> - <echo> -Djdo.tck.identitytypes=xxx - a list of identity
>> types (applicationidentity, datastoreidentity)</echo>
>> + <echo> -Djdo.tck.identitytypes=xxx - a list of identity types
>> (applicationidentity, datastoreidentity)</echo>
>> + <echo> -Djdo.tck.cleanupaftertest=xxx - true/false. Setting it
>> to false will retain data in database after test. This will allow
>> inspection of data after test is run. Default is true</echo>
>> <echo></echo>
>> <echo>Examples:</echo>
>> <echo> maven -Djdo.tck.identitytypes=datastoreidentity
>> installSchema</echo>
>> @@ -314,6 +315,8 @@
>> value="${jdo.tck.exclude}"/>
>> <sysproperty key="jdo.tck.log.directory"
>> value="${jdo.tck.log.directory}/${timestamp}"/>
>> + <sysproperty key="jdo.tck.cleanupaftertest"
>> + value="${jdo.tck.cleanupaftertest}"/>
>> <jvmarg line="${database.runtck.sysproperties}"/>
>> <jvmarg line="${iut.runtck.sysproperties}"/>
>> <arg line="${jdo.tck.classes}"/>
>> @@ -361,6 +364,8 @@
>> value="${jdo.tck.exclude}"/>
>> <sysproperty key="jdo.tck.log.directory"
>> value="${jdo.tck.log.directory}/${timestamp}"/>
>> + <sysproperty key="jdo.tck.cleanupaftertest"
>> + value="${jdo.tck.cleanupaftertest}"/>
>> <jvmarg line="${database.runtck.sysproperties}"/>
>> <jvmarg line="${jdo.runtck.sysproperties}"/>
>> <arg line="${jdo.tck.classes}"/>
>> Index: C:/ApacheJDO/trunk/tck20/project.properties
>> ===================================================================
>> --- C:/ApacheJDO/trunk/tck20/project.properties (revision 279926)
>> +++ C:/ApacheJDO/trunk/tck20/project.properties (working copy)
>> @@ -42,7 +42,8 @@
>> maven.junit.dir = ${jdo.tck.testdir}
>> maven.junit.sysproperties = PMFProperties
>> PMFProperties = jdori.properties
>> -
>> +# Setting this property to false will turn off cleanup of data from
>> database to inspect database contents after test run
>> +jdo.tck.cleanupaftertest = true
>> # JDO TCK settings
>> jdo.tck.dblist=derby
>> jdo.tck.identitytypes=applicationidentity datastoreidentity
>>
>
> Craig Russell
>
> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
>
> 408 276-5638 mailto:Craig.Russell@sun.com
>
> P.S. A good JDO? O, Gasp!
>
>
--
Karan Singh
Re: JDO-131 patch (updated)
Posted by Craig Russell <Cr...@Sun.COM>.
Hi Karan,
Looks good. Some minor comments:
1. Typo contaninig
2. Use spaces instead of tabs for indenting code.
3. You seem to have changed the indenting or something on the <echo>
-Djdo.tck.identitytypes line. The diff shows the line being deleted
and inserted.
Thanks,
Craig
On Sep 12, 2005, at 6:59 PM, karan malhi wrote:
> Here is the patch for JDO-131 incorporating Craig and Michael's
> recommendations.
>
> --
> Karan Singh
>
> Index: C:/ApacheJDO/trunk/tck20/test/java/org/apache/jdo/tck/
> JDO_Test.java
> ===================================================================
> --- C:/ApacheJDO/trunk/tck20/test/java/org/apache/jdo/tck/
> JDO_Test.java (revision 279926)
> +++ C:/ApacheJDO/trunk/tck20/test/java/org/apache/jdo/tck/
> JDO_Test.java (working copy)
> @@ -137,6 +137,13 @@
> /** Name of the file contaninig the properties for the PMF. */
> protected static String PMFProperties = System.getProperty
> ("PMFProperties");
>
> + /** String indicating whether to clean up data after tests or
> not. The value can be either
> + * "true" or "false". If "false" then test will not clean up
> data from database.
> + * The default value is "true".
> + */
> + protected static boolean cleanupData =
> + System.getProperty("jdo.tck.cleanupaftertest",
> "true").equalsIgnoreCase("true");
> +
> /** The Properties object for the PersistenceManagerFactory. */
> protected static Properties PMFPropertiesObject;
>
> @@ -260,7 +267,9 @@
> pmf = null;
>
> try {
> - localTearDown();
> + if (cleanupData) {
> + localTearDown();
> + }
> }
> catch (Throwable t) {
> setTearDownThrowable("localTearDown", t);
> Index: C:/ApacheJDO/trunk/tck20/maven.xml
> ===================================================================
> --- C:/ApacheJDO/trunk/tck20/maven.xml (revision 279926)
> +++ C:/ApacheJDO/trunk/tck20/maven.xml (working copy)
> @@ -41,7 +41,8 @@
> <echo>Options for this project are:</echo>
> <echo> -Djdo.tck.cfglist=xxx - a list of configuration
> files (must be in test/conf)</echo>
> <echo> -Djdo.tck.dblist=xxx - a list of databases</echo>
> - <echo> -Djdo.tck.identitytypes=xxx - a list of identity
> types (applicationidentity, datastoreidentity)</echo>
> + <echo> -Djdo.tck.identitytypes=xxx - a list of identity types
> (applicationidentity, datastoreidentity)</echo>
> + <echo> -Djdo.tck.cleanupaftertest=xxx - true/false. Setting
> it to false will retain data in database after test. This will
> allow inspection of data after test is run. Default is true</echo>
> <echo></echo>
> <echo>Examples:</echo>
> <echo> maven -Djdo.tck.identitytypes=datastoreidentity
> installSchema</echo>
> @@ -314,6 +315,8 @@
> value="${jdo.tck.exclude}"/>
> <sysproperty key="jdo.tck.log.directory"
> value="${jdo.tck.log.directory}/$
> {timestamp}"/>
> + <sysproperty key="jdo.tck.cleanupaftertest"
> + value="${jdo.tck.cleanupaftertest}"/>
> <jvmarg line="${database.runtck.sysproperties}"/>
> <jvmarg line="${iut.runtck.sysproperties}"/>
> <arg line="${jdo.tck.classes}"/>
> @@ -361,6 +364,8 @@
> value="${jdo.tck.exclude}"/>
> <sysproperty key="jdo.tck.log.directory"
> value="${jdo.tck.log.directory}/$
> {timestamp}"/>
> + <sysproperty key="jdo.tck.cleanupaftertest"
> + value="${jdo.tck.cleanupaftertest}"/>
> <jvmarg line="${database.runtck.sysproperties}"/>
> <jvmarg line="${jdo.runtck.sysproperties}"/>
> <arg line="${jdo.tck.classes}"/>
> Index: C:/ApacheJDO/trunk/tck20/project.properties
> ===================================================================
> --- C:/ApacheJDO/trunk/tck20/project.properties (revision 279926)
> +++ C:/ApacheJDO/trunk/tck20/project.properties (working copy)
> @@ -42,7 +42,8 @@
> maven.junit.dir = ${jdo.tck.testdir}
> maven.junit.sysproperties = PMFProperties
> PMFProperties = jdori.properties
> -
> +# Setting this property to false will turn off cleanup of data
> from database to inspect database contents after test run
> +jdo.tck.cleanupaftertest = true
> # JDO TCK settings
> jdo.tck.dblist=derby
> jdo.tck.identitytypes=applicationidentity datastoreidentity
>
Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!