brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [2/5] brooklyn-server git commit: Review comment updates.
Date Wed, 26 Oct 2016 09:50:53 GMT
Review comment updates.


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/0559ff08
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/0559ff08
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/0559ff08

Branch: refs/heads/master
Commit: 0559ff08919ad09ca2333fd6f6cf3c9ddaab8197
Parents: c5118e9
Author: Geoff Macartney <geoff.macartney@cloudsoftcorp.com>
Authored: Tue Oct 25 13:51:47 2016 +0100
Committer: Geoff Macartney <geoff.macartney@cloudsoftcorp.com>
Committed: Tue Oct 25 13:51:47 2016 +0100

----------------------------------------------------------------------
 .../org/apache/brooklyn/core/entity/BrooklynConfigKeys.java    | 6 +++++-
 .../entity/software/base/SoftwareProcessEntityLatchTest.java   | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/0559ff08/core/src/main/java/org/apache/brooklyn/core/entity/BrooklynConfigKeys.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/entity/BrooklynConfigKeys.java b/core/src/main/java/org/apache/brooklyn/core/entity/BrooklynConfigKeys.java
index ec5f34c..a97a5d9 100644
--- a/core/src/main/java/org/apache/brooklyn/core/entity/BrooklynConfigKeys.java
+++ b/core/src/main/java/org/apache/brooklyn/core/entity/BrooklynConfigKeys.java
@@ -23,6 +23,7 @@ import static org.apache.brooklyn.core.config.ConfigKeys.newConfigKey;
 import static org.apache.brooklyn.core.config.ConfigKeys.newConfigKeyWithPrefix;
 import static org.apache.brooklyn.core.config.ConfigKeys.newStringConfigKey;
 
+import com.google.common.annotations.Beta;
 import org.apache.brooklyn.api.location.Location;
 import org.apache.brooklyn.config.ConfigKey;
 import org.apache.brooklyn.core.config.BasicConfigInheritance;
@@ -179,7 +180,10 @@ public class BrooklynConfigKeys {
 
     public static final ConfigKey<Boolean> PROVISION_LATCH = newBooleanConfigKey("provision.latch",
"Latch for blocking location provision until ready");
     public static final ConfigKey<Boolean> START_LATCH = newBooleanConfigKey("start.latch",
"Latch for blocking start until ready");
-    public static final ConfigKey<Boolean> STOP_LATCH = newBooleanConfigKey("stop.latch",
"Latch for blocking stop until a condition is met");
+
+    @Beta // on stop DSLs time out after a minute and unblock; may be easier to fix after
https://github.com/apache/brooklyn-server/pull/390
+    public static final ConfigKey<Boolean> STOP_LATCH = newBooleanConfigKey("stop.latch",
"Latch for blocking stop until a condition is met; will block for at most 1 minute and then
time out");
+
     public static final ConfigKey<Boolean> SETUP_LATCH = newBooleanConfigKey("setup.latch",
"Latch for blocking setup until ready");
     public static final ConfigKey<Boolean> PRE_INSTALL_RESOURCES_LATCH = newBooleanConfigKey("resources.preInstall.latch",
"Latch for blocking pre-install resources until ready");
     public static final ConfigKey<Boolean> INSTALL_RESOURCES_LATCH = newBooleanConfigKey("resources.install.latch",
"Latch for blocking install resources until ready");

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/0559ff08/software/base/src/test/java/org/apache/brooklyn/entity/software/base/SoftwareProcessEntityLatchTest.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/org/apache/brooklyn/entity/software/base/SoftwareProcessEntityLatchTest.java
b/software/base/src/test/java/org/apache/brooklyn/entity/software/base/SoftwareProcessEntityLatchTest.java
index 937e4c5..ba62208 100644
--- a/software/base/src/test/java/org/apache/brooklyn/entity/software/base/SoftwareProcessEntityLatchTest.java
+++ b/software/base/src/test/java/org/apache/brooklyn/entity/software/base/SoftwareProcessEntityLatchTest.java
@@ -134,7 +134,7 @@ public class SoftwareProcessEntityLatchTest extends BrooklynAppUnitTestSupport
{
         assertEffectorBlockingDetailsEventually(entity, MyService.STOP.getName(), "Waiting
for config " + SoftwareProcess.STOP_LATCH.getName());
 
         app.sensors().set(stopper, true);
-        stopTask.get(Duration.THIRTY_SECONDS);
+        stopTask.get(Asserts.DEFAULT_LONG_TIMEOUT);
 
         assertDriverEventsEquals(entity, ImmutableList.of("setup", "copyInstallResources",
"install", "customize", "copyRuntimeResources", "launch", "stop"));
     }


Mime
View raw message