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 am...@apache.org on 2019/09/27 06:05:27 UTC

svn commit: r1867618 - /jackrabbit/oak/trunk/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/BaseDocumentDiscoveryLiteServiceTest.java

Author: amitj
Date: Fri Sep 27 06:05:27 2019
New Revision: 1867618

URL: http://svn.apache.org/viewvc?rev=1867618&view=rev
Log:
OAK-8593: Enable a transient cluster-node to connect as invisible to oak discovery

- Fixed test expectations

Modified:
    jackrabbit/oak/trunk/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/BaseDocumentDiscoveryLiteServiceTest.java

Modified: jackrabbit/oak/trunk/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/BaseDocumentDiscoveryLiteServiceTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/BaseDocumentDiscoveryLiteServiceTest.java?rev=1867618&r1=1867617&r2=1867618&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/BaseDocumentDiscoveryLiteServiceTest.java (original)
+++ jackrabbit/oak/trunk/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/BaseDocumentDiscoveryLiteServiceTest.java Fri Sep 27 06:05:27 2019
@@ -684,12 +684,14 @@ public abstract class BaseDocumentDiscov
         logger.info("checkFiestaState: checking state. expected active: "+activeIds+", inactive: "+inactiveIds);
         for (Iterator<SimplifiedInstance> it = instances.iterator(); it.hasNext();) {
             SimplifiedInstance anInstance = it.next();
-
-            final ViewExpectation e = new ViewExpectation(anInstance);
-            e.setActiveIds(activeIds.toArray(new Integer[activeIds.size()]));
-            e.setInactiveIds(inactiveIds.toArray(new Integer[inactiveIds.size()]));
-            waitFor(e, 60000, "checkFiestaState failed for " + anInstance + ", with instances: " + instances + ", and inactiveIds: "
+            if (!anInstance.isInvisible()) {
+                final ViewExpectation e = new ViewExpectation(anInstance);
+                e.setActiveIds(activeIds.toArray(new Integer[activeIds.size()]));
+                e.setInactiveIds(inactiveIds.toArray(new Integer[inactiveIds.size()]));
+                waitFor(e, 60000, "checkFiestaState failed for " + anInstance + ", with instances: " + instances + ","
+                    + " and inactiveIds: "
                     + inactiveIds);
+            }
         }
     }
 
@@ -845,9 +847,7 @@ public abstract class BaseDocumentDiscov
                         final SimplifiedInstance instance = instances.remove(random.nextInt(instances.size()));
                         assertNotNull(instance.workingDir);
                         logger.info("Case 3: Shutdown instance: " + instance.ns.getClusterId());
-                        if (!instance.isInvisible()) {
-                            inactiveIds.put(instance.ns.getClusterId(), instance.workingDir);
-                        }
+                        inactiveIds.put(instance.ns.getClusterId(), instance.workingDir);
                         instance.shutdown();
                     }
                     break;