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 "Matthew T. Adams (JIRA)" <ji...@apache.org> on 2006/01/06 18:24:22 UTC

[jira] Created: (JDO-273) Create tests for section 5.5.8 & 5.5.9, detachment lifecycle

Create tests for section 5.5.8 & 5.5.9, detachment lifecycle
------------------------------------------------------------

         Key: JDO-273
         URL: http://issues.apache.org/jira/browse/JDO-273
     Project: JDO
        Type: Test
  Components: tck20  
    Reporter: Matthew T. Adams


Write tests for assertions in sections "5.5.8 Detached-clean", "5.5.9 Detached-dirty".

-- 
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-273) Create tests for sections 5.5.8 & 5.5.9, detachment lifecycle

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

Craig Russell updated JDO-273:
------------------------------

    Fix Version: JDO 2 rc1
        Version: JDO 2 beta

> Create tests for sections 5.5.8 & 5.5.9, detachment lifecycle
> -------------------------------------------------------------
>
>          Key: JDO-273
>          URL: http://issues.apache.org/jira/browse/JDO-273
>      Project: JDO
>         Type: Test
>   Components: tck20
>     Versions: JDO 2 beta
>     Reporter: Matthew T. Adams
>     Assignee: Michael Watzek
>      Fix For: JDO 2 rc1
>  Attachments: JDO-273.patch
>
> Write tests for assertions in sections "5.5.8 Detached-clean", "5.5.9 Detached-dirty".

-- 
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-273) Create tests for sections 5.5.8 & 5.5.9, detachment lifecycle

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

    Resolution: Fixed

> Create tests for sections 5.5.8 & 5.5.9, detachment lifecycle
> -------------------------------------------------------------
>
>          Key: JDO-273
>          URL: http://issues.apache.org/jira/browse/JDO-273
>      Project: JDO
>         Type: Test
>   Components: tck20
>     Versions: JDO 2 beta
>     Reporter: Matthew T. Adams
>     Assignee: Martin Zaun
>      Fix For: JDO 2 final
>  Attachments: JDO-273.patch
>
> Write tests for assertions in sections "5.5.8 Detached-clean", "5.5.9 Detached-dirty".

-- 
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] Reopened: (JDO-273) Create tests for sections 5.5.8 & 5.5.9, detachment lifecycle

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


> Create tests for sections 5.5.8 & 5.5.9, detachment lifecycle
> -------------------------------------------------------------
>
>          Key: JDO-273
>          URL: http://issues.apache.org/jira/browse/JDO-273
>      Project: JDO
>         Type: Test
>   Components: tck20
>     Versions: JDO 2 beta
>     Reporter: Matthew T. Adams
>     Assignee: Martin Zaun
>      Fix For: JDO 2 final
>  Attachments: JDO-273.patch
>
> Write tests for assertions in sections "5.5.8 Detached-clean", "5.5.9 Detached-dirty".

-- 
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-273) Create tests for sections 5.5.8 & 5.5.9, detachment lifecycle

Posted by "Martin Zaun (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JDO-273?page=comments#action_12372021 ] 

Martin Zaun commented on JDO-273:
---------------------------------

> - Review and clarify the state transition for argument instances of states 'hollow' and
>  'persistent-nontransactional' for serialize with active tx. Currently, the test expects for
>  both, datastore and optimistic, tx a transition to 'persistent-clean'. Some discussion,
>  however, has suggested that UNCHANGED should be the transition for optimistic tx. 

Confirmed by Craig: UNCHANGED should be the state transition for serialize with optimistic tx.
Committed fix with revision 389247.


> Create tests for sections 5.5.8 & 5.5.9, detachment lifecycle
> -------------------------------------------------------------
>
>          Key: JDO-273
>          URL: http://issues.apache.org/jira/browse/JDO-273
>      Project: JDO
>         Type: Test
>   Components: tck20
>     Versions: JDO 2 beta
>     Reporter: Matthew T. Adams
>     Assignee: Martin Zaun
>      Fix For: JDO 2 final
>  Attachments: JDO-273.patch
>
> Write tests for assertions in sections "5.5.8 Detached-clean", "5.5.9 Detached-dirty".

-- 
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] Assigned: (JDO-273) Create tests for sections 5.5.8 & 5.5.9, detachment lifecycle

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

Michael Watzek reassigned JDO-273:
----------------------------------

    Assign To: Michael Watzek

> Create tests for sections 5.5.8 & 5.5.9, detachment lifecycle
> -------------------------------------------------------------
>
>          Key: JDO-273
>          URL: http://issues.apache.org/jira/browse/JDO-273
>      Project: JDO
>         Type: Test
>   Components: tck20
>     Reporter: Matthew T. Adams
>     Assignee: Michael Watzek

>
> Write tests for assertions in sections "5.5.8 Detached-clean", "5.5.9 Detached-dirty".

-- 
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-273) Create tests for sections 5.5.8 & 5.5.9, detachment lifecycle

Posted by "Martin Zaun (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JDO-273?page=comments#action_12371528 ] 

Martin Zaun commented on JDO-273:
---------------------------------


> - File a jpox issue on the failing state transitions for argument instances (29 errors)
>   and returned instances (19 errors).

Filed as issue JDO-347.

> - There's a large amount of code duplication between classes StateTransitions and
>   StateTransitionsReturnedObjects. File an issue for later cleanup and refactorization.

Filed as issue JDO-346.


> Create tests for sections 5.5.8 & 5.5.9, detachment lifecycle
> -------------------------------------------------------------
>
>          Key: JDO-273
>          URL: http://issues.apache.org/jira/browse/JDO-273
>      Project: JDO
>         Type: Test
>   Components: tck20
>     Versions: JDO 2 beta
>     Reporter: Matthew T. Adams
>     Assignee: Martin Zaun
>      Fix For: JDO 2 final
>  Attachments: JDO-273.patch
>
> Write tests for assertions in sections "5.5.8 Detached-clean", "5.5.9 Detached-dirty".

-- 
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-273) Create tests for sections 5.5.8 & 5.5.9, detachment lifecycle

Posted by "Martin Zaun (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JDO-273?page=comments#action_12371588 ] 

Martin Zaun commented on JDO-273:
---------------------------------

Sorry for the missing class src/java/org/apache/jdo/tck/lifecycle/StateTransitionsReturnedObjects.java.
Checked in with revision 388211.

> Create tests for sections 5.5.8 & 5.5.9, detachment lifecycle
> -------------------------------------------------------------
>
>          Key: JDO-273
>          URL: http://issues.apache.org/jira/browse/JDO-273
>      Project: JDO
>         Type: Test
>   Components: tck20
>     Versions: JDO 2 beta
>     Reporter: Matthew T. Adams
>     Assignee: Martin Zaun
>      Fix For: JDO 2 final
>  Attachments: JDO-273.patch
>
> Write tests for assertions in sections "5.5.8 Detached-clean", "5.5.9 Detached-dirty".

-- 
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-273) Create tests for sections 5.5.8 & 5.5.9, detachment lifecycle

Posted by "Matthew T. Adams (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JDO-273?page=all ]

Matthew T. Adams updated JDO-273:
---------------------------------

    Summary: Create tests for sections 5.5.8 & 5.5.9, detachment lifecycle  (was: Create tests for section 5.5.8 & 5.5.9, detachment lifecycle)

> Create tests for sections 5.5.8 & 5.5.9, detachment lifecycle
> -------------------------------------------------------------
>
>          Key: JDO-273
>          URL: http://issues.apache.org/jira/browse/JDO-273
>      Project: JDO
>         Type: Test
>   Components: tck20
>     Reporter: Matthew T. Adams

>
> Write tests for assertions in sections "5.5.8 Detached-clean", "5.5.9 Detached-dirty".

-- 
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-273) Create tests for sections 5.5.8 & 5.5.9, detachment lifecycle

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

Michael Watzek updated JDO-273:
-------------------------------

    Attachment: JDO-273.patch

The attached patch implements the lifecycle transition tests for JDO-258 and JDO-273.

The patch extends the existing test class org.apache.jdo.tck.lifecycle.StateTransitions and adds a new test class org.apache.jdo.tck.lifecycle.CheckStatesOfReturnedObjects.

The lifecycle matrix in class StateTransitions has been extended by three states (persistent-nontransactional-dirty, detached-clean, and detached-dirty) and by five operations (detach-all-on-commit, detachCopy-outside-tx, detachCopy-inside-tx, serialize-outside-tx, and serialize-inside-tx). Note, that this class checks lifecycle transitions on the parameter instance of the operations above.

Class CheckStatesOfReturnedObjects almost implements the same algorithm and lifecycle matrix as class StateTransitions. There are mainly two differences:

1) The maxtrix only considers operations makePersistent plus the five new operations above.
2) The expected state is checked against the returned instance of an operation.

Currently, both classes still contain some comments in the matrix. These comments are not meant to be checked in, but they have to be removed before check in. All places where these comments occur, JPOX currently returns an unexpected state. Due to the fact that the test fails for the first unexpected state, I decided to put the expected state in comments. The comments follow the pattern /*Bug: EXPECTED_STATE*/UNEXPECTED_STATE. In particular, I found the following bugs:

Class StateTransitions:
-- makeTransactional(detached-clean) -> transient-clean (must be
JDOUserException)
-- makeTransactional(detached-dirty) -> transient-clean (must be
JDOUserException)
-- makeTransient(persistent-nontransactional-dirty) -> transient (must be JDOUserException)
-- makeTransient(detached-clean) -> detached-clean (must be
JDOUserException)
-- makeTransient(detached-dirty) -> detached-dirty (must be
JDOUserException)
-- commit, detachAllOnCommit==true (hollow) -> hollow (must be
detached-clean)
-- commit, detachAllOnCommit==true (persistent-new-deleted) ->
JDOObjectNotFoundException (must be transient)
-- commit, detachAllOnCommit==true (persistent-deleted) ->
JDOObjectNotFoundException (must be transient)
-- commit, detachAllOnCommit==true (persistent-nontransational) ->
hollow (must be detached-clean)
-- detachCopy with active tx (transient) -> transient (must be persistent-new)
-- detachCopy with active tx (transient-clean) -> transient-clean (must be persistent-new)
-- detachCopy with active tx (transient-dirty) -> transient-dirty (must be persistent-new)

Class CheckStatesOfReturnedObjects :
-- makePersistent(detached-clean) -> persistent-dirty (must be persistent-clean)
-- detachCopy with active tx (transient) -> transient (must be detached-clean)
-- detachCopy with active tx (transient-clean) -> transient (must be detached-clean)
-- detachCopy with active tx (transient-dirty) -> transient (must be detached-dirty)
-- serialize with active tx (persistent-new) -> transient (must be detached-clean)


> Create tests for sections 5.5.8 & 5.5.9, detachment lifecycle
> -------------------------------------------------------------
>
>          Key: JDO-273
>          URL: http://issues.apache.org/jira/browse/JDO-273
>      Project: JDO
>         Type: Test
>   Components: tck20
>     Reporter: Matthew T. Adams
>     Assignee: Michael Watzek
>  Attachments: JDO-273.patch
>
> Write tests for assertions in sections "5.5.8 Detached-clean", "5.5.9 Detached-dirty".

-- 
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-273) Create tests for sections 5.5.8 & 5.5.9, detachment lifecycle

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

Craig Russell updated JDO-273:
------------------------------

    Fix Version: JDO 2 final
                     (was: JDO 2 rc1)

> Create tests for sections 5.5.8 & 5.5.9, detachment lifecycle
> -------------------------------------------------------------
>
>          Key: JDO-273
>          URL: http://issues.apache.org/jira/browse/JDO-273
>      Project: JDO
>         Type: Test
>   Components: tck20
>     Versions: JDO 2 beta
>     Reporter: Matthew T. Adams
>     Assignee: Martin Zaun
>      Fix For: JDO 2 final
>  Attachments: JDO-273.patch
>
> Write tests for assertions in sections "5.5.8 Detached-clean", "5.5.9 Detached-dirty".

-- 
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-273) Create tests for sections 5.5.8 & 5.5.9, detachment lifecycle

Posted by "Michelle Caisse (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JDO-273?page=comments#action_12371885 ] 

Michelle Caisse commented on JDO-273:
-------------------------------------

I have added the new assertions in sections 5.5.8 and 5.5.9 to the assertions spreadsheet.  The test classes need to have their Assertion ID comment fields and ASSERTION_FAILED Strings updated with the list of new assertions tested, including the assertions listed  in JDO-258.

> Create tests for sections 5.5.8 & 5.5.9, detachment lifecycle
> -------------------------------------------------------------
>
>          Key: JDO-273
>          URL: http://issues.apache.org/jira/browse/JDO-273
>      Project: JDO
>         Type: Test
>   Components: tck20
>     Versions: JDO 2 beta
>     Reporter: Matthew T. Adams
>     Assignee: Martin Zaun
>      Fix For: JDO 2 final
>  Attachments: JDO-273.patch
>
> Write tests for assertions in sections "5.5.8 Detached-clean", "5.5.9 Detached-dirty".

-- 
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] Assigned: (JDO-273) Create tests for sections 5.5.8 & 5.5.9, detachment lifecycle

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

Martin Zaun reassigned JDO-273:
-------------------------------

    Assign To: Martin Zaun  (was: Michael Watzek)

> Create tests for sections 5.5.8 & 5.5.9, detachment lifecycle
> -------------------------------------------------------------
>
>          Key: JDO-273
>          URL: http://issues.apache.org/jira/browse/JDO-273
>      Project: JDO
>         Type: Test
>   Components: tck20
>     Versions: JDO 2 beta
>     Reporter: Matthew T. Adams
>     Assignee: Martin Zaun
>      Fix For: JDO 2 rc1
>  Attachments: JDO-273.patch
>
> Write tests for assertions in sections "5.5.8 Detached-clean", "5.5.9 Detached-dirty".

-- 
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-273) Create tests for sections 5.5.8 & 5.5.9, detachment lifecycle

Posted by "Martin Zaun (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JDO-273?page=comments#action_12372039 ] 

Martin Zaun commented on JDO-273:
---------------------------------

Requested by Craig: As the spec leaves open some behaviour with 'detachCopy outside tx',
the StateTransitionsReturnedObjects test should skip this scenario for now.

To re-enable, just uncomment this scenario in the array:
    private static final boolean[][] applies_to_scenario = {
        ...
        //{   false,         false,       true },   // detachCopy outside tx

Committed in revision 389315.

> Create tests for sections 5.5.8 & 5.5.9, detachment lifecycle
> -------------------------------------------------------------
>
>          Key: JDO-273
>          URL: http://issues.apache.org/jira/browse/JDO-273
>      Project: JDO
>         Type: Test
>   Components: tck20
>     Versions: JDO 2 beta
>     Reporter: Matthew T. Adams
>     Assignee: Martin Zaun
>      Fix For: JDO 2 final
>  Attachments: JDO-273.patch
>
> Write tests for assertions in sections "5.5.8 Detached-clean", "5.5.9 Detached-dirty".

-- 
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-273) Create tests for sections 5.5.8 & 5.5.9, detachment lifecycle

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

    Resolution: Fixed

Combined patch for JDO-273 and JDO-258 committed with revision 388087.

The patch is based on Michael Watzek's patch for JDO-273 with a couple of modifications:
- merged with latest JDO_Test.java, resolved conflicting changes
- renamed class CheckStatesOfReturnedObjects to StateTransitionsReturnedObjects
- changed classes StateTransitions and StateTransitionsReturnedObjects not to fail on
  the first error but to collect all error messages and test for failure at the end of test()
- re-enacted the correct but commented state transitions currently failed by jpox
  (see Michael's comments above)
- reviewed and fixed a number of failing state transitions with Craig
- added a few cleanups

There are a few action items left:

- Review and clarify the state transition for argument instances of states 'hollow' and
  'persistent-nontransactional' for serialize with active tx. Currently, the test expects for
  both, datastore and optimistic, tx a transition to 'persistent-clean'.  Some discussion,
  however, has suggested that UNCHANGED should be the transition for optimistic tx.

- File a jpox issue on the failing state transitions for argument instances (29 errors)
  and returned instances (19 errors).

- There's a large amount of code duplication between classes StateTransitions and
  StateTransitionsReturnedObjects. File an issue for later cleanup and refactorization.



> Create tests for sections 5.5.8 & 5.5.9, detachment lifecycle
> -------------------------------------------------------------
>
>          Key: JDO-273
>          URL: http://issues.apache.org/jira/browse/JDO-273
>      Project: JDO
>         Type: Test
>   Components: tck20
>     Versions: JDO 2 beta
>     Reporter: Matthew T. Adams
>     Assignee: Martin Zaun
>      Fix For: JDO 2 final
>  Attachments: JDO-273.patch
>
> Write tests for assertions in sections "5.5.8 Detached-clean", "5.5.9 Detached-dirty".

-- 
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