You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2014/08/30 01:01:09 UTC
[09/26] git commit: a bunch more service-up checks (WIP)
a bunch more service-up checks (WIP)
Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/94184b2f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/94184b2f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/94184b2f
Branch: refs/heads/master
Commit: 94184b2f65bfe8a00fd6fe170f22c276ad9b29db
Parents: 843f1fc
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Wed Aug 6 23:48:26 2014 -0400
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Wed Aug 27 02:07:49 2014 -0400
----------------------------------------------------------------------
.../basic/lifecycle/ScriptHelperTest.java | 25 +++++++++++---------
1 file changed, 14 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/94184b2f/software/base/src/test/java/brooklyn/entity/basic/lifecycle/ScriptHelperTest.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/brooklyn/entity/basic/lifecycle/ScriptHelperTest.java b/software/base/src/test/java/brooklyn/entity/basic/lifecycle/ScriptHelperTest.java
index ef61fb8..9894a9e 100644
--- a/software/base/src/test/java/brooklyn/entity/basic/lifecycle/ScriptHelperTest.java
+++ b/software/base/src/test/java/brooklyn/entity/basic/lifecycle/ScriptHelperTest.java
@@ -40,6 +40,7 @@ import brooklyn.location.LocationSpec;
import brooklyn.location.basic.FixedListMachineProvisioningLocation;
import brooklyn.location.basic.SshMachineLocation;
import brooklyn.test.EntityTestUtils;
+import brooklyn.util.time.Duration;
import com.google.common.base.Functions;
import com.google.common.collect.ImmutableList;
@@ -88,20 +89,22 @@ public class ScriptHelperTest extends BrooklynAppUnitTestSupport {
@Override public Class<?> getDriverInterface() {
return SimulatedInessentialIsRunningDriver.class;
}
-
+
@Override
public void connectServiceUpIsRunning() {
+ super.connectServiceUpIsRunning();
+ // run more often
FunctionFeed.builder()
- .entity(this)
- .period(500)
- .poll(new FunctionPollConfig<Boolean, Boolean>(SERVICE_UP)
- .onException(Functions.constant(Boolean.FALSE))
- .callable(new Callable<Boolean>() {
- public Boolean call() {
- return getDriver().isRunning();
- }
- }))
- .build();
+ .entity(this)
+ .period(Duration.millis(10))
+ .poll(new FunctionPollConfig<Boolean, Boolean>(SERVICE_PROCESS_IS_RUNNING)
+ .onException(Functions.constant(Boolean.FALSE))
+ .callable(new Callable<Boolean>() {
+ public Boolean call() {
+ return getDriver().isRunning();
+ }
+ }))
+ .build();
}
}