You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Julian Reschke (JIRA)" <ji...@apache.org> on 2014/02/18 17:15:19 UTC

[jira] [Commented] (OAK-1335) version history related test failures

    [ https://issues.apache.org/jira/browse/OAK-1335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13904202#comment-13904202 ] 

Julian Reschke commented on OAK-1335:
-------------------------------------

I see still test failures. For testInitialNumberOfVersions they are caused by the initial version history containing only one entry (the root entry).

Modified test case to provide more detail:

{code}
    public void testInitialNumberOfVersions() throws RepositoryException {
        long initialSize = getNumberOfVersions(vHistory);
        if (initialSize != 2) {
            String path = versionableNode.getPath();
            logger.error("incorrect initial VHR size: " + initialSize);
            VersionIterator it = vHistory.getAllVersions();
            while (it.hasNext()) {
                logger.error("version present: " + it.nextVersion().getPath());
            }
            logger.error("ischeckedout (node): " + versionableNode.isCheckedOut());
            logger.error("ischeckedout (vm): " + versionableNode.getSession().getWorkspace().getVersionManager().isCheckedOut(path));

            vHistory.getSession().refresh(true);
            initialSize = getNumberOfVersions(vHistory);
            logger.error("initial VHR size after refresh: " + initialSize);

            superuser.refresh(true);
            logger.error("size seen from other session: " + getNumberOfVersions(superuser.getWorkspace().getVersionManager().getVersionHistory(path)));

            Session s = super.getHelper().getReadOnlySession();
            try {
                logger.error("size seen from new session: " + getNumberOfVersions(s.getWorkspace().getVersionManager().getVersionHistory(path)));
            }
            finally {
                s.logout();
            }
        }

        assertEquals("VersionHistory.getAllVersions() initially returns an iterator with two versions.", 2, initialSize);
    }
{code}

Log output:

{noformat}
17:02:01.353 INFO  [main] JUnitTest.java:44                  Starting test case testInitialNumberOfVersions
17:02:01.353 WARN  [main] ItemImpl.java:275                  Item#save is only supported when the subtree rooted at that item contains all transient changes. Falling back to Session#save since system property item-save-does-session-save is true.
17:02:01.363 ERROR [main] VersionHistoryTest.java:127        incorrect initial VHR size: 1
17:02:01.363 ERROR [main] VersionHistoryTest.java:130        version present: /jcr:system/jcr:versionStorage/d7/4e/7f/d74e7fe5-442c-4dfc-bb35-24542d388137/jcr:rootVersion
17:02:01.363 ERROR [main] VersionHistoryTest.java:132        ischeckedout (node): false
17:02:01.363 ERROR [main] VersionHistoryTest.java:133        ischeckedout (vm): false
17:02:01.363 ERROR [main] VersionHistoryTest.java:137        initial VHR size after refresh: 1
17:02:01.363 ERROR [main] VersionHistoryTest.java:140        size seen from other session: 1
17:02:01.363 ERROR [main] VersionHistoryTest.java:144        size seen from new session: 1
17:02:01.373 INFO  [main] JUnitTest.java:48                  Completed test case testInitialNumberOfVersions
{noformat}

> version history related test failures
> -------------------------------------
>
>                 Key: OAK-1335
>                 URL: https://issues.apache.org/jira/browse/OAK-1335
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: jcr
>            Reporter: Julian Reschke
>             Fix For: 0.17
>
>         Attachments: log
>
>
> ...when running the integrationTesting profile:
> Failed tests:   testInitialNumberOfVersions(org.apache.jackrabbit.test.api.version.VersionHistoryTest): VersionHistory.getAllVersions() initially returns an iterator with two versions. expected:<2> but was:<1>
>   testInitialNumberOfLinearVersions(org.apache.jackrabbit.test.api.version.VersionHistoryTest): VersionHistory.getAllVersions() and .getAllLinearVersions should return the same number of versions for a purely linear version history. expected:<1> but was:<2>
>   testGetAllVersions(org.apache.jackrabbit.test.api.version.VersionHistoryTest): VersionHistory.getAllVersions() must contain the root version and all versions that have been created with a Node.checkin() call.
>   testGetAllVersionsJcr2(org.apache.jackrabbit.test.api.version.VersionHistoryTest): VersionHistory.getAllVersions() must contain the root version and all versions that have been created with a Node.checkin() call.
>   testCheckinCreatesNewVersionJcr2(org.apache.jackrabbit.test.api.version.CheckinTest): Checkin must create a new Version in the VersionHistory.
>   testRestoreNameJcr2(org.apache.jackrabbit.test.api.version.RestoreTest): restore must restore child node version 1.0. expected:<1.[0]> but was:<1.[1]>



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)