This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-clients.git


The following commit(s) were added to refs/heads/master by this push:
     new bdfcefc  SLING-7680 fix component lifecycle states as being exposed by 
Apache Felix DS Web Console
bdfcefc is described below

commit bdfcefc30acefa829110ff4e9cd97068ba1fe7f5
Author: Konrad Windszus <[email protected]>
AuthorDate: Fri May 25 09:46:06 2018 +0200

    SLING-7680 fix component lifecycle states as being exposed by Apache
    Felix DS Web Console
---
 .../org/apache/sling/testing/clients/osgi/Component.java    | 13 ++++++++++---
 .../sling/testing/clients/osgi/OsgiConsoleClient.java       |  3 ++-
 .../org/apache/sling/testing/clients/osgi/package-info.java |  2 +-
 3 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/src/main/java/org/apache/sling/testing/clients/osgi/Component.java 
b/src/main/java/org/apache/sling/testing/clients/osgi/Component.java
index 045160c..817d408 100644
--- a/src/main/java/org/apache/sling/testing/clients/osgi/Component.java
+++ b/src/main/java/org/apache/sling/testing/clients/osgi/Component.java
@@ -21,11 +21,18 @@ public class Component {
 
     public enum Status {
 
+        // the states being used in the DS Felix WebConsole are listed in 
https://github.com/apache/felix/blob/6e5cde8471febb36bc72adeba85989edba943188/webconsole-plugins/ds/src/main/java/org/apache/felix/webconsole/plugins/ds/internal/ComponentConfigurationPrinter.java#L374
         ACTIVE("active"),
 
-        REGISTERED("registered"),
+        SATISFIED("satisfied"),
 
-        UNSATISFIED("unsatisfied");
+        UNSATISFIED_CONFIGURATION("unsatisfied (configuration)"),
+
+        UNSATISFIED_REFERENCE("unsatisfied (reference)"),
+
+        FAILED_ACTIVATION("failed activation"),
+
+        UNKNOWN("unknown");
 
         String value;
 
@@ -39,7 +46,7 @@ public class Component {
                     return s;
                 }
             }
-            return null;
+            return UNKNOWN;
         }
 
         public String toString() {
diff --git 
a/src/main/java/org/apache/sling/testing/clients/osgi/OsgiConsoleClient.java 
b/src/main/java/org/apache/sling/testing/clients/osgi/OsgiConsoleClient.java
index 1e8fac4..528117c 100644
--- a/src/main/java/org/apache/sling/testing/clients/osgi/OsgiConsoleClient.java
+++ b/src/main/java/org/apache/sling/testing/clients/osgi/OsgiConsoleClient.java
@@ -198,6 +198,7 @@ public class OsgiConsoleClient extends SlingClient {
 
     /**
      * Wait until the component with the given name is registered. This means 
the component must be either in state "Registered" or "Active".
+     * The state registered is called "satisfied" in the Felix DS Web Console
      * @param componentName the component's name
      * @param timeout how long to wait for the component to become registered 
before throwing a {@code TimeoutException} in milliseconds
      * @param delay time to wait between checks of the state in milliseconds
@@ -211,7 +212,7 @@ public class OsgiConsoleClient extends SlingClient {
             public Boolean call() throws Exception {
                 ComponentInfo info = getComponentInfo(componentName);
                 if (info != null) {
-                    return ((info.getStatus() == Component.Status.REGISTERED) 
|| (info.getStatus() == Component.Status.ACTIVE));
+                    return ((info.getStatus() == Component.Status.SATISFIED) 
|| (info.getStatus() == Component.Status.ACTIVE));
                 } else {
                     LOG.debug("Could not get component info for component name 
{}", componentName);
                 }
diff --git 
a/src/main/java/org/apache/sling/testing/clients/osgi/package-info.java 
b/src/main/java/org/apache/sling/testing/clients/osgi/package-info.java
index fa38949..33bde1e 100644
--- a/src/main/java/org/apache/sling/testing/clients/osgi/package-info.java
+++ b/src/main/java/org/apache/sling/testing/clients/osgi/package-info.java
@@ -19,7 +19,7 @@
 /**
  * OSGI testing tools.
  */
-@Version("1.4.0")
+@Version("2.0.0")
 package org.apache.sling.testing.clients.osgi;
 
 import org.osgi.annotation.versioning.Version;

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to