Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-7891

Fix unexpected test failures caused by DataStoreUtils.testPropertySetup

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • blob-plugins
    • None
    • Patch

    Description

      Tests in oak-blob-plugins will sometimes pass and sometimes fail, even running on the same version of the code.

      These failures are caused by DataStoreUtils.testPropertySetup, which sets a property (DS_CLASS_NAME) but doesn’t reset it when it’s done. This causes tests in SharedDataStoreUtils, BlobIdTrackerTest, and BlobIdTrackerClusterSharedTest (14 tests in total) to fail if they run after this test.
      To fix this issue, I have reset the properties set in DataStoreUtils.testPropertySetup to their values before the test changed them.

      To replicate this issue, you can run:

      mvn test -Dtest="SharedDataStoreUtilsTest#testRefsNotAvailableAllRepos,DataStoreUtils#testPropertySetup" -Dsurefire.runOrder=alphabetical

      and

      mvn test -Dtest="SharedDataStoreUtilsTest#testRefsNotAvailableAllRepos,DataStoreUtils#testPropertySetup" -Dsurefire.runOrder=reversealphabetical

      and see that the results differ.

      A link to a pull request which fixes the issue is here: https://github.com/apache/jackrabbit-oak/pull/110

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              OrDTesters OrDTesters
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: