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 "Michael Watzek (JIRA)" <ji...@apache.org> on 2005/12/07 17:13:08 UTC

[jira] Created: (JDO-230) Fix order of makePersistent() and addTearDownClass() in localSetUp methods

Fix order of makePersistent() and addTearDownClass() in localSetUp methods
--------------------------------------------------------------------------

         Key: JDO-230
         URL: http://issues.apache.org/jira/browse/JDO-230
     Project: JDO
        Type: Bug
  Components: tck20  
    Versions: JDO 2 beta    
    Reporter: Michael Watzek
 Assigned to: Michael Watzek 
    Priority: Minor
     Fix For: JDO 2 beta


The order of calls makePersistent() and addTearDownClass() in localSetUp methods is significant: addTearDownClass()  must be called before makePersistent(). This ensures that the next test run will cleanup the database.

Currently, many tests call makePersistent() before addTearDownClass(). Given that there is data in the database that will cause a duplicate key exception, the database will not be cleaned up, because tear down classes have not been added at the time the exception is thrown.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (JDO-230) Fix order of makePersistent() and addTearDownClass() in localSetUp methods

Posted by "Michael Watzek (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JDO-230?page=all ]

Michael Watzek updated JDO-230:
-------------------------------

    Attachment: JDO-230.patch

The attched patch fixes this issue.


> Fix order of makePersistent() and addTearDownClass() in localSetUp methods
> --------------------------------------------------------------------------
>
>          Key: JDO-230
>          URL: http://issues.apache.org/jira/browse/JDO-230
>      Project: JDO
>         Type: Bug
>   Components: tck20
>     Reporter: Michael Watzek
>     Assignee: Michael Watzek
>     Priority: Minor
>      Fix For: JDO 2 beta
>  Attachments: JDO-230.patch
>
> The order of calls makePersistent() and addTearDownClass() in localSetUp methods is significant: addTearDownClass()  must be called before makePersistent(). This ensures that the next test run will cleanup the database.
> Currently, many tests call makePersistent() before addTearDownClass(). Given that there is data in the database that will cause a duplicate key exception, the database will not be cleaned up, because tear down classes have not been added at the time the exception is thrown.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (JDO-230) Fix order of makePersistent() and addTearDownClass() in localSetUp methods

Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JDO-230?page=all ]

Craig Russell updated JDO-230:
------------------------------

    Version:     (was: JDO 2 beta)

JDO 2 beta has not shipped yet; so this bug should not affect it.

> Fix order of makePersistent() and addTearDownClass() in localSetUp methods
> --------------------------------------------------------------------------
>
>          Key: JDO-230
>          URL: http://issues.apache.org/jira/browse/JDO-230
>      Project: JDO
>         Type: Bug
>   Components: tck20
>     Reporter: Michael Watzek
>     Assignee: Michael Watzek
>     Priority: Minor
>      Fix For: JDO 2 beta

>
> The order of calls makePersistent() and addTearDownClass() in localSetUp methods is significant: addTearDownClass()  must be called before makePersistent(). This ensures that the next test run will cleanup the database.
> Currently, many tests call makePersistent() before addTearDownClass(). Given that there is data in the database that will cause a duplicate key exception, the database will not be cleaned up, because tear down classes have not been added at the time the exception is thrown.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (JDO-230) Fix order of makePersistent() and addTearDownClass() in localSetUp methods

Posted by "Michael Watzek (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JDO-230?page=all ]
     
Michael Watzek resolved JDO-230:
--------------------------------

    Fix Version:     (was: JDO 2 beta)
     Resolution: Fixed

The attched patch has been checked in (revision 355479).


> Fix order of makePersistent() and addTearDownClass() in localSetUp methods
> --------------------------------------------------------------------------
>
>          Key: JDO-230
>          URL: http://issues.apache.org/jira/browse/JDO-230
>      Project: JDO
>         Type: Bug
>   Components: tck20
>     Reporter: Michael Watzek
>     Assignee: Michael Watzek
>     Priority: Minor
>  Attachments: JDO-230.patch
>
> The order of calls makePersistent() and addTearDownClass() in localSetUp methods is significant: addTearDownClass()  must be called before makePersistent(). This ensures that the next test run will cleanup the database.
> Currently, many tests call makePersistent() before addTearDownClass(). Given that there is data in the database that will cause a duplicate key exception, the database will not be cleaned up, because tear down classes have not been added at the time the exception is thrown.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (JDO-230) Fix order of makePersistent() and addTearDownClass() in localSetUp methods

Posted by "Michael Bouschen (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JDO-230?page=comments#action_12359873 ] 

Michael Bouschen commented on JDO-230:
--------------------------------------

The patch looks good, no comments.

> Fix order of makePersistent() and addTearDownClass() in localSetUp methods
> --------------------------------------------------------------------------
>
>          Key: JDO-230
>          URL: http://issues.apache.org/jira/browse/JDO-230
>      Project: JDO
>         Type: Bug
>   Components: tck20
>     Reporter: Michael Watzek
>     Assignee: Michael Watzek
>     Priority: Minor
>      Fix For: JDO 2 beta
>  Attachments: JDO-230.patch
>
> The order of calls makePersistent() and addTearDownClass() in localSetUp methods is significant: addTearDownClass()  must be called before makePersistent(). This ensures that the next test run will cleanup the database.
> Currently, many tests call makePersistent() before addTearDownClass(). Given that there is data in the database that will cause a duplicate key exception, the database will not be cleaned up, because tear down classes have not been added at the time the exception is thrown.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira