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 "OrDTesters (JIRA)" <ji...@apache.org> on 2018/11/09 23:54:00 UTC

[jira] [Created] (OAK-7891) Fix unexpected test failures caused by DataStoreUtils.testPropertySetup

OrDTesters created OAK-7891:
-------------------------------

             Summary: Fix unexpected test failures caused by DataStoreUtils.testPropertySetup
                 Key: OAK-7891
                 URL: https://issues.apache.org/jira/browse/OAK-7891
             Project: Jackrabbit Oak
          Issue Type: Bug
          Components: blob-plugins
         Environment: Ubuntu 18.04

java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)

Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T13:33:14-05:00)
            Reporter: OrDTesters


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:
{code:java}
mvn test -Dtest="SharedDataStoreUtilsTest#testRefsNotAvailableAllRepos,DataStoreUtils#testPropertySetup" -Dsurefire.runOrder=alphabetical{code}
and
{code:java}
mvn test -Dtest="SharedDataStoreUtilsTest#testRefsNotAvailableAllRepos,DataStoreUtils#testPropertySetup" -Dsurefire.runOrder=reversealphabetical{code}
and see that the results differ.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)