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

ModeShapeUnitTest is resulting in failures when starting engine in BeforeClass method using configuration file on classpath

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Blocker
    • 2.5.0.Final
    • 2.5.0.Beta2
    • Testing
    • None

    Description

      The JcrDriverIntegrationTest has been failing for some time on the Hudson boxes, yet it's been running successfully on developer boxes. Turns out the problem is in a base class (ModeShapeUnitTest extended by ModeShapeMultiUseTest extended by JcrDriverIntegrationTest) and how the 'startEngineUsing(...)' method works when supplied with the path to the configuration file that should be on the classpath. When this method is called in a static method (e.g., the @BeforeClass method), the classloader is null and the method looks for the configuration file on the file system and then under 'src/test/resources'. That's obviously a problem when the configuration file has Maven replacement properties, and the real file is placed by Maven under 'target'.

      The 'startEngineUsing' method needs to take the class under test as an additional parameter, and the JcrDriverIntegrationTest needs to use this new method.

      Attachments

        Activity

          People

            rhauch Randall Hauch (Inactive)
            rhauch Randall Hauch (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: