jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Parvulescu (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (JCR-3069) add optional consistency checks to test suite
Date Thu, 06 Oct 2011 21:05:30 GMT

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

Alex Parvulescu updated JCR-3069:

    Attachment: JCR-3069-extra-test.patch

patch to the patch :)

added a unit test not sure about the location, it can change.

I moved the consistency check from ConcurrentImportTest to TestHelper. I liked it because
it only needed a session, as opposed to the other one that was a bit more complicated.

This would allow us to hook in a call to the check(session) after each test.
> add optional consistency checks to test suite
> ---------------------------------------------
>                 Key: JCR-3069
>                 URL: https://issues.apache.org/jira/browse/JCR-3069
>             Project: Jackrabbit Content Repository
>          Issue Type: Wish
>          Components: jackrabbit-core
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>         Attachments: JCR-3069-extra-test.patch, JCR-3069.patch, JCR-3069.patch, JCR-3069.patch
> We know that certain sequences of calls can cause the persistent state to become inconsistent,
such as by producing orphaned nodes.
> This usually does not manifest itself in tests failing. However, it can mean (silent)
data loss, and become visible at a different point of time in the form of nodes that can be
discovered using a query, but which can not compute their path.
> Checking the persistence layer's consistency is implementation specific. In Jackrabbit,
there is a consistency check call on the PersistenceManager that we could use. It just logs
a results and doesn't provide a checkable return value, but it would be a start.
> Proposed helper code (thx to Marcel for the proposal):
>      /**
>      * Runs a consistency check on the given workspace.
>      *
>      * @param name the name of the workspace to perform the consistency check.
>      * @param repo the repository instance.
>      * @throws RepositoryException if an error occurs while getting the
>      *                             workspace with the given name.
>      */
>     public static void checkConsistency(String name, RepositoryImpl repo)
>             throws RepositoryException {
>         RepositoryImpl.WorkspaceInfo wspInfo = repo.getWorkspaceInfo(name);
>         wspInfo.getPersistenceManager().checkConsistency(null, true, false);
>     }

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


View raw message