Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-1555

Reuse TCK tests "known.issues" property to ignore certain tests

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 3.0.0.Alpha6
    • Fix Version/s: 3.0.0.Beta2
    • Component/s: JCR, Testing
    • Labels:
      None

      Description

      The Jackrabbit TCK unit tests already incorporate a mechanism to "ignore" a set of tests, and it doesn't require changing the source code (which is actually pretty nice).

      In the POM file (of whatever Maven module where the TCK tests are run), we simply need to define a "known.issues" property in the Surefire configuration, such as the following:

      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          ...
          <systemProperties>
            ...
            <property>
              <name>known.issues</name>
              <value>
      org.apache.jackrabbit.test.api.ShareableNodeTest#testMoveShareableNode
      org.apache.jackrabbit.test.api.ShareableNodeTest#testTransientMoveShareableNode
              </value>
            </property>
            ...
          </systemProperties>
        </configuration>
      </plugin>
      

      The value of the property needs to be the fully qualified name of the test case. They can be selectively overridden on the Maven command line without touching the pom.xml file, using:

      mvn ... -Dknown.issues.override=DocumentViewTest
      

      which supports support this format for identifying test cases:

      [[fully.qualified.]MyTest][#testFoo]
      

      Running the test cases from an IDE may still fail if the system property is not set. Not sure if the Maven integration will properly set the system properties. (This is a significant disadvantage of this approach over what we have now.)

      Note that this works not by skipping the test but instead by ignoring the failure in org.apache.jackrabbit.test.JCRTestResult.

      (See http://jackrabbit.510166.n4.nabble.com/skip-test-cases-for-known-issues-td529649.html for the original discussion of how this works within the TCK test suite.)

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                hchiorean Horia Chiorean
                Reporter:
                rhauch Randall Hauch
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: