You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by ch...@apache.org on 2016/07/05 08:32:38 UTC

svn commit: r1751410 - /jackrabbit/oak/trunk/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/FixturesHelper.java

Author: chetanm
Date: Tue Jul  5 08:32:38 2016
New Revision: 1751410

URL: http://svn.apache.org/viewvc?rev=1751410&view=rev
Log:
OAK-4475 - CI failing on branches due to unknown fixture SEGMENT_TAR

Ensure that fixture set is not empty in case of unknown fixture to avoid running against all fixture

Modified:
    jackrabbit/oak/trunk/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/FixturesHelper.java

Modified: jackrabbit/oak/trunk/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/FixturesHelper.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/FixturesHelper.java?rev=1751410&r1=1751409&r2=1751410&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/FixturesHelper.java (original)
+++ jackrabbit/oak/trunk/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/FixturesHelper.java Tue Jul  5 08:32:38 2016
@@ -53,6 +53,7 @@ public final class FixturesHelper {
             FIXTURES = unmodifiableSet(EnumSet.allOf(Fixture.class));
         } else {
             Set<Fixture> tmp = EnumSet.noneOf(Fixture.class);
+            boolean unknownFixture = false;
             for (String f : raw.split(SPLIT_ON)) {
                 String x = f.trim().toUpperCase();
                 try {
@@ -63,9 +64,17 @@ public final class FixturesHelper {
                     //so would need to be ignored
                     if (!"SEGMENT_TAR".equals(x)){
                         throw e;
+                    } else {
+                        unknownFixture = true;
                     }
                 }
             }
+
+            //If SEGMENT_TAR is missing (true for branches) then
+            //ensure that tmp maps to MEMORY_NS to avoid running all fixture
+            if (tmp.isEmpty() && unknownFixture){
+                tmp.add(Fixture.MEMORY_NS);
+            }
             
             if (tmp.isEmpty()) {
                 FIXTURES = unmodifiableSet(EnumSet.allOf(Fixture.class));