Jackrabbit Content Repository
  1. Jackrabbit Content Repository
  2. JCR-2662

JCR unit tests for journaled observation do not check capabilities and require implementation, contrary to JCR 2.0 specification

    Details

      Description

      The org.apache.jackrabbit.test.api.observation.EventJournalTest class obtains the EventJournal from the observation manager, but does not check the capabilities of the JCR implementation before running these tests. Therefore, these tests always fail when run against any implementation that chooses not to implement the optional journaled observation feature.

      Per the second paragraph in chapter 12 of the JCR 2.0 specification, any implementation that does support journaled observation should have in its descriptors a value of "true" for the Repository.OPTION_JOURNALED_OBSERVATION_SUPPORTED key. See [1]

      The EventJournalTest methods should check this value and skip their tests, or simply check that the two ObservationManager.getEventJournal(...) methods do return null references if the feature is not supported (per the JavaDoc, see [2] and [3]).

      [1] http://www.day.com/specs/jcr/2.0/12_Observation.html
      [2] http://www.day.com/maven/javax.jcr/javadocs/jcr-2.0/javax/jcr/observation/ObservationManager.html#getEventJournal()
      [3] http://www.day.com/maven/javax.jcr/javadocs/jcr-2.0/javax/jcr/observation/ObservationManager.html#getEventJournal(int,%20java.lang.String,%20boolean,%20java.lang.String[],%20java.lang.String[])

      1. JCR-2662.patch
        0.7 kB
        Horia Chiorean

        Activity

        Alex Parvulescu made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Jukka Zitting made changes -
        Fix Version/s 2.5 [ 12319280 ]
        Fix Version/s 2.6 [ 12319480 ]
        Julian Reschke made changes -
        Fix Version/s 2.6 [ 12319480 ]
        Resolution Fixed [ 1 ]
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Fix Version/s 2.4.2 [ 12320366 ]
        Julian Reschke made changes -
        Assignee Julian Reschke [ reschke ]
        Horia Chiorean made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Affects Version/s 2.4 [ 12318241 ]
        Affects Version/s 2.1 [ 12314477 ]
        Horia Chiorean made changes -
        Field Original Value New Value
        Attachment JCR-2662.patch [ 12523771 ]
        Randall Hauch created issue -

          People

          • Assignee:
            Julian Reschke
            Reporter:
            Randall Hauch
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development