brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From drigod...@apache.org
Subject [1/7] brooklyn-server git commit: Use EnricherSpec, instead of enricher constructor
Date Mon, 12 Jun 2017 14:47:20 GMT
Repository: brooklyn-server
Updated Branches:
  refs/heads/master ed25e5e39 -> a98357415


Use EnricherSpec, instead of enricher constructor

Prefer use of EnricherSpec (so it definitely works with yaml as well,
and so we have one consistent way of creating things!)

Deletes some enricher constructors that take Map or ConfigBag arg


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

Branch: refs/heads/master
Commit: 91c4a5d26c00460465df2825fda5996e06adffdb
Parents: 78f41f8
Author: Aled Sage <aled.sage@gmail.com>
Authored: Sun Jun 11 13:52:31 2017 +0100
Committer: Aled Sage <aled.sage@gmail.com>
Committed: Sun Jun 11 14:10:05 2017 +0100

----------------------------------------------------------------------
 .../entity/lifecycle/ServiceStateLogic.java     |  1 -
 .../brooklyn/enricher/stock/UpdatingMap.java    |  6 ----
 .../core/enricher/BasicEnricherTest.java        | 16 +++++----
 .../core/enricher/EnricherConfigTest.java       | 28 ++++++++--------
 .../core/policy/basic/EnricherTypeTest.java     |  8 +++--
 .../policy/enricher/HttpLatencyDetector.java    | 34 +++++++++++++++++---
 .../policy/ha/ServiceFailureDetector.java       | 15 ++-------
 .../enricher/HttpLatencyDetectorTest.java       |  8 ++---
 .../policy/enricher/RebindEnricherTest.java     |  2 +-
 9 files changed, 66 insertions(+), 52 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/91c4a5d2/core/src/main/java/org/apache/brooklyn/core/entity/lifecycle/ServiceStateLogic.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/entity/lifecycle/ServiceStateLogic.java
b/core/src/main/java/org/apache/brooklyn/core/entity/lifecycle/ServiceStateLogic.java
index bfde073..ba08a44 100644
--- a/core/src/main/java/org/apache/brooklyn/core/entity/lifecycle/ServiceStateLogic.java
+++ b/core/src/main/java/org/apache/brooklyn/core/entity/lifecycle/ServiceStateLogic.java
@@ -278,7 +278,6 @@ public class ServiceStateLogic {
         private final AtomicInteger warnCounter = new AtomicInteger();
 
         public ComputeServiceState() {}
-        public ComputeServiceState(Map<?,?> flags) { super(flags); }
 
         @Override
         public void init() {

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/91c4a5d2/core/src/main/java/org/apache/brooklyn/enricher/stock/UpdatingMap.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/enricher/stock/UpdatingMap.java b/core/src/main/java/org/apache/brooklyn/enricher/stock/UpdatingMap.java
index 501d199..6945d50 100644
--- a/core/src/main/java/org/apache/brooklyn/enricher/stock/UpdatingMap.java
+++ b/core/src/main/java/org/apache/brooklyn/enricher/stock/UpdatingMap.java
@@ -38,7 +38,6 @@ import org.slf4j.LoggerFactory;
 
 import com.google.common.base.Function;
 import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Maps;
 import com.google.common.reflect.TypeToken;
 
 /**
@@ -85,11 +84,6 @@ public class UpdatingMap<S,TKey,TVal> extends AbstractEnricher implements
Sensor
     protected Boolean removingIfResultIsNull;
 
     public UpdatingMap() {
-        this(Maps.newLinkedHashMap());
-    }
-
-    public UpdatingMap(Map<Object, Object> flags) {
-        super(flags);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/91c4a5d2/core/src/test/java/org/apache/brooklyn/core/enricher/BasicEnricherTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/core/enricher/BasicEnricherTest.java b/core/src/test/java/org/apache/brooklyn/core/enricher/BasicEnricherTest.java
index ae61d0a..98ab41c 100644
--- a/core/src/test/java/org/apache/brooklyn/core/enricher/BasicEnricherTest.java
+++ b/core/src/test/java/org/apache/brooklyn/core/enricher/BasicEnricherTest.java
@@ -19,6 +19,7 @@
 package org.apache.brooklyn.core.enricher;
 
 import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
 
 import java.util.Map;
 
@@ -27,9 +28,7 @@ import org.apache.brooklyn.api.sensor.Enricher;
 import org.apache.brooklyn.api.sensor.EnricherSpec;
 import org.apache.brooklyn.config.ConfigKey;
 import org.apache.brooklyn.core.config.BasicConfigKey;
-import org.apache.brooklyn.core.enricher.AbstractEnricher;
 import org.apache.brooklyn.core.entity.BrooklynConfigKeys;
-import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
 import org.apache.brooklyn.core.test.BrooklynAppUnitTestSupport;
 import org.apache.brooklyn.core.test.entity.TestApplication;
 import org.apache.brooklyn.core.test.entity.TestApplicationNoEnrichersImpl;
@@ -38,6 +37,7 @@ import org.apache.brooklyn.util.core.flags.SetFromFlag;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 
+import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Iterables;
 
 /**
@@ -52,7 +52,7 @@ public class BasicEnricherTest extends BrooklynAppUnitTestSupport {
     protected void setUpApp() {
         EntitySpec<TestApplication> appSpec = EntitySpec.create(TestApplication.class,
TestApplicationNoEnrichersImpl.class)
                 .configure(BrooklynConfigKeys.SKIP_ON_BOX_BASE_DIR_RESOLUTION, shouldSkipOnBoxBaseDirResolution());
-        app = ApplicationBuilder.newManagedApp(appSpec, mgmt);
+        app = mgmt.getEntityManager().createEntity(appSpec);
     }
 
     public static class MyEnricher extends AbstractEnricher {
@@ -79,7 +79,9 @@ public class BasicEnricherTest extends BrooklynAppUnitTestSupport {
         enricher.setDisplayName("Bob");
         enricher.config().set(MyEnricher.STR_KEY, "aval");
         enricher.config().set(MyEnricher.INT_KEY, 2);
+        
         app.enrichers().add(enricher);
+        assertTrue(app.enrichers().asList().contains(enricher), "enrichers="+app.enrichers());
         
         assertEquals(enricher.getDisplayName(), "Bob");
         assertEquals(enricher.getConfig(MyEnricher.STR_KEY), "aval");
@@ -91,6 +93,7 @@ public class BasicEnricherTest extends BrooklynAppUnitTestSupport {
         MyEnricher enricher = app.enrichers().add(EnricherSpec.create(MyEnricher.class)
             .displayName("Bob")
             .configure(MyEnricher.STR_KEY, "aval").configure(MyEnricher.INT_KEY, 2));
+        assertTrue(app.enrichers().asList().contains(enricher), "enrichers="+app.enrichers());
         
         assertEquals(enricher.getDisplayName(), "Bob");
         assertEquals(enricher.getConfig(MyEnricher.STR_KEY), "aval");
@@ -107,11 +110,12 @@ public class BasicEnricherTest extends BrooklynAppUnitTestSupport {
 
     @Test
     public void testSameUniqueTagEnricherNotAddedTwice() throws Exception {
-        app.enrichers().add(EnricherSpec.create(MyEnricher.class).tag(99).uniqueTag("x"));
-        app.enrichers().add(EnricherSpec.create(MyEnricher.class).tag(94).uniqueTag("x"));
+        MyEnricher enricher1 = app.enrichers().add(EnricherSpec.create(MyEnricher.class).tag(99).uniqueTag("x"));
+        MyEnricher enricher2 = app.enrichers().add(EnricherSpec.create(MyEnricher.class).tag(94).uniqueTag("x"));
         
-        assertEquals(app.getEnrichers().size(), 1);
         // the more recent one should dominate
+        assertEquals(app.enrichers().asList(), ImmutableList.of(enricher2));
+        
         Enricher enricher = Iterables.getOnlyElement(app.enrichers());
         Assert.assertTrue(enricher.tags().containsTag(94));
         Assert.assertFalse(enricher.tags().containsTag(99));

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/91c4a5d2/core/src/test/java/org/apache/brooklyn/core/enricher/EnricherConfigTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/core/enricher/EnricherConfigTest.java
b/core/src/test/java/org/apache/brooklyn/core/enricher/EnricherConfigTest.java
index fb60abd..aae382c 100644
--- a/core/src/test/java/org/apache/brooklyn/core/enricher/EnricherConfigTest.java
+++ b/core/src/test/java/org/apache/brooklyn/core/enricher/EnricherConfigTest.java
@@ -21,6 +21,7 @@ package org.apache.brooklyn.core.enricher;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.fail;
 
+import org.apache.brooklyn.api.sensor.EnricherSpec;
 import org.apache.brooklyn.core.config.BasicConfigKey;
 import org.apache.brooklyn.core.enricher.BasicEnricherTest.MyEnricher;
 import org.apache.brooklyn.core.test.BrooklynAppUnitTestSupport;
@@ -79,22 +80,24 @@ public class EnricherConfigTest extends BrooklynAppUnitTestSupport {
     
     @Test
     public void testConfigSetToGroovyTruthFalseIsAvailable() throws Exception {
-        MyEnricher enricher = new MyEnricher(MutableMap.builder()
-                .put(MyEnricher.INT_KEY_WITH_DEFAULT, 0)
-                .build());
-        app.enrichers().add(enricher);
+        MyEnricher enricher = app.enrichers().add(EnricherSpec.create(MyEnricher.class)
+                .configure(MyEnricher.INT_KEY_WITH_DEFAULT, 0));
+        MyEnricher enricher2 = app.enrichers().add(EnricherSpec.create(MyEnricher.class)
+                .configure(MyEnricher.INT_KEY_WITH_DEFAULT.getName(), 0));
         
         assertEquals(enricher.getConfig(MyEnricher.INT_KEY_WITH_DEFAULT), (Integer)0);
+        assertEquals(enricher2.getConfig(MyEnricher.INT_KEY_WITH_DEFAULT), (Integer)0);
     }
     
     @Test
     public void testConfigSetToNullIsAvailable() throws Exception {
-        MyEnricher enricher = new MyEnricher(MutableMap.builder()
-                .put(MyEnricher.STR_KEY_WITH_DEFAULT, null)
-                .build());
-        app.enrichers().add(enricher);
+        MyEnricher enricher = app.enrichers().add(EnricherSpec.create(MyEnricher.class)
+                .configure(MyEnricher.STR_KEY_WITH_DEFAULT, (String)null));
+        MyEnricher enricher2 = app.enrichers().add(EnricherSpec.create(MyEnricher.class)
+                .configure(MyEnricher.STR_KEY_WITH_DEFAULT.getName(), null));
         
         assertEquals(enricher.getConfig(MyEnricher.STR_KEY_WITH_DEFAULT), null);
+        assertEquals(enricher2.getConfig(MyEnricher.STR_KEY_WITH_DEFAULT), null);
     }
     
     @Test
@@ -121,10 +124,8 @@ public class EnricherConfigTest extends BrooklynAppUnitTestSupport {
 
     @Test
     public void testConfigCannotBeSetAfterApplicationIsStarted() throws Exception {
-        MyEnricher enricher = new MyEnricher(MutableMap.builder()
-                .put(MyEnricher.STR_KEY, "origval")
-                .build());
-        app.enrichers().add(enricher);
+        MyEnricher enricher = app.enrichers().add(EnricherSpec.create(MyEnricher.class)
+                .configure(MyEnricher.STR_KEY, "origval"));
         
         try {
             enricher.config().set(MyEnricher.STR_KEY,"newval");
@@ -138,8 +139,7 @@ public class EnricherConfigTest extends BrooklynAppUnitTestSupport {
     
     @Test
     public void testConfigReturnsDefaultValueIfNotSet() throws Exception {
-        MyEnricher enricher = new MyEnricher();
-        app.enrichers().add(enricher);
+        MyEnricher enricher = app.enrichers().add(EnricherSpec.create(MyEnricher.class));
         
         assertEquals(enricher.getConfig(MyEnricher.STR_KEY_WITH_DEFAULT), "str key default");
     }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/91c4a5d2/core/src/test/java/org/apache/brooklyn/core/policy/basic/EnricherTypeTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/core/policy/basic/EnricherTypeTest.java
b/core/src/test/java/org/apache/brooklyn/core/policy/basic/EnricherTypeTest.java
index 12a6bff..8a8505f 100644
--- a/core/src/test/java/org/apache/brooklyn/core/policy/basic/EnricherTypeTest.java
+++ b/core/src/test/java/org/apache/brooklyn/core/policy/basic/EnricherTypeTest.java
@@ -20,21 +20,25 @@ package org.apache.brooklyn.core.policy.basic;
 
 import static org.testng.Assert.assertEquals;
 
+import org.apache.brooklyn.api.sensor.EnricherSpec;
 import org.apache.brooklyn.api.sensor.EnricherType;
 import org.apache.brooklyn.core.config.BasicConfigKey;
 import org.apache.brooklyn.core.enricher.AbstractEnricher;
+import org.apache.brooklyn.core.test.BrooklynAppUnitTestSupport;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
 import com.google.common.collect.ImmutableSet;
 
-public class EnricherTypeTest {
+public class EnricherTypeTest extends BrooklynAppUnitTestSupport {
     private MyEnricher enricher;
     
     @BeforeMethod(alwaysRun=true)
+    @Override
     public void setUp() throws Exception{
-        enricher = new MyEnricher();
+        super.setUp();
+        enricher = app.enrichers().add(EnricherSpec.create(MyEnricher.class));
     }
 
     @AfterMethod(alwaysRun=true)

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/91c4a5d2/policy/src/main/java/org/apache/brooklyn/policy/enricher/HttpLatencyDetector.java
----------------------------------------------------------------------
diff --git a/policy/src/main/java/org/apache/brooklyn/policy/enricher/HttpLatencyDetector.java
b/policy/src/main/java/org/apache/brooklyn/policy/enricher/HttpLatencyDetector.java
index 84e9dd7..3e56c27 100644
--- a/policy/src/main/java/org/apache/brooklyn/policy/enricher/HttpLatencyDetector.java
+++ b/policy/src/main/java/org/apache/brooklyn/policy/enricher/HttpLatencyDetector.java
@@ -32,6 +32,7 @@ import org.apache.brooklyn.api.entity.Entity;
 import org.apache.brooklyn.api.entity.EntityLocal;
 import org.apache.brooklyn.api.sensor.AttributeSensor;
 import org.apache.brooklyn.api.sensor.Enricher;
+import org.apache.brooklyn.api.sensor.EnricherSpec;
 import org.apache.brooklyn.api.sensor.SensorEvent;
 import org.apache.brooklyn.api.sensor.SensorEventListener;
 import org.apache.brooklyn.config.ConfigKey;
@@ -203,9 +204,11 @@ public class HttpLatencyDetector extends AbstractEnricher implements
Enricher {
     protected void activateAdditionalEnrichers(EntityLocal entity) {
         Duration rollupWindowSize = getConfig(ROLLUP_WINDOW_SIZE);
         if (rollupWindowSize!=null) {
-            entity.enrichers().add(new RollingTimeWindowMeanEnricher<Double>(entity,
-                REQUEST_LATENCY_IN_SECONDS_MOST_RECENT, REQUEST_LATENCY_IN_SECONDS_IN_WINDOW,
-                rollupWindowSize));
+            entity.enrichers().add(EnricherSpec.create(RollingTimeWindowMeanEnricher.class)
+                    .configure("producer", entity)
+                    .configure("source", REQUEST_LATENCY_IN_SECONDS_MOST_RECENT)
+                    .configure("target", REQUEST_LATENCY_IN_SECONDS_IN_WINDOW)
+                    .configure("timePeriod", rollupWindowSize));
         }
     }
 
@@ -305,8 +308,13 @@ public class HttpLatencyDetector extends AbstractEnricher implements
Enricher {
             return this;
         }
 
-        /** returns the detector. note that callers should then add this to the entity,
-         * typically using {@link Entity#addEnricher(Enricher)} */
+        /**
+         * Returns the detector. note that callers should then add this to the entity,
+         * typically using {@link Entity#addEnricher(Enricher)}.
+         * 
+         * @deprecated since 0.12.0; instead use {@link #buildSpec()} or directly use {@link
EnricherSpec}
+         */
+        @Deprecated
         public HttpLatencyDetector build() {
             return new HttpLatencyDetector(MutableMap.builder()
                     .putIfNotNull(PERIOD, period)
@@ -317,5 +325,21 @@ public class HttpLatencyDetector extends AbstractEnricher implements
Enricher {
                     .putIfNotNull(URL_POST_PROCESSING, urlPostProcessing)
                     .build());
         }
+        
+        /**
+         * Returns the detector. note that callers should then add this to the entity,
+         * typically using {@link Entity#addEnricher(EnricherSpec)}
+         * 
+         * @see {@link EnricherSpec}
+         */
+        public EnricherSpec<HttpLatencyDetector> buildSpec() {
+            return EnricherSpec.create(HttpLatencyDetector.class)
+                    .configureIfNotNull(PERIOD, period)
+                    .configureIfNotNull(ROLLUP_WINDOW_SIZE, rollupWindowSize)
+                    .configureIfNotNull(REQUIRE_SERVICE_UP, requireServiceUp)
+                    .configureIfNotNull((ConfigKey<Object>)URL, url)
+                    .configureIfNotNull(URL_SENSOR, urlSensor)
+                    .configureIfNotNull(URL_POST_PROCESSING, urlPostProcessing);
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/91c4a5d2/policy/src/main/java/org/apache/brooklyn/policy/ha/ServiceFailureDetector.java
----------------------------------------------------------------------
diff --git a/policy/src/main/java/org/apache/brooklyn/policy/ha/ServiceFailureDetector.java
b/policy/src/main/java/org/apache/brooklyn/policy/ha/ServiceFailureDetector.java
index bc3e10a..4cc0541 100644
--- a/policy/src/main/java/org/apache/brooklyn/policy/ha/ServiceFailureDetector.java
+++ b/policy/src/main/java/org/apache/brooklyn/policy/ha/ServiceFailureDetector.java
@@ -34,11 +34,8 @@ import org.apache.brooklyn.core.entity.lifecycle.Lifecycle;
 import org.apache.brooklyn.core.entity.lifecycle.ServiceStateLogic;
 import org.apache.brooklyn.core.entity.lifecycle.ServiceStateLogic.ComputeServiceState;
 import org.apache.brooklyn.core.sensor.BasicNotificationSensor;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.brooklyn.policy.ha.HASensors.FailureDescriptor;
 import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.core.config.ConfigBag;
 import org.apache.brooklyn.util.core.flags.SetFromFlag;
 import org.apache.brooklyn.util.core.task.BasicTask;
 import org.apache.brooklyn.util.core.task.ScheduledTask;
@@ -46,6 +43,8 @@ import org.apache.brooklyn.util.exceptions.Exceptions;
 import org.apache.brooklyn.util.guava.Maybe;
 import org.apache.brooklyn.util.time.Duration;
 import org.apache.brooklyn.util.time.Time;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /** 
  * Emits {@link HASensors#ENTITY_FAILED} whenever the parent's default logic ({@link ComputeServiceState})
would detect a problem,
@@ -153,16 +152,6 @@ public class ServiceFailureDetector extends ServiceStateLogic.ComputeServiceStat
     }
     
     public ServiceFailureDetector() {
-        this(new ConfigBag());
-    }
-    
-    public ServiceFailureDetector(Map<String,?> flags) {
-        this(new ConfigBag().putAll(flags));
-    }
-    
-    public ServiceFailureDetector(ConfigBag configBag) {
-        // TODO hierarchy should use ConfigBag, and not change flags
-        super(configBag.getAllConfigMutable());
     }
     
     @Override

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/91c4a5d2/policy/src/test/java/org/apache/brooklyn/policy/enricher/HttpLatencyDetectorTest.java
----------------------------------------------------------------------
diff --git a/policy/src/test/java/org/apache/brooklyn/policy/enricher/HttpLatencyDetectorTest.java
b/policy/src/test/java/org/apache/brooklyn/policy/enricher/HttpLatencyDetectorTest.java
index 5c0c09f..248891b 100644
--- a/policy/src/test/java/org/apache/brooklyn/policy/enricher/HttpLatencyDetectorTest.java
+++ b/policy/src/test/java/org/apache/brooklyn/policy/enricher/HttpLatencyDetectorTest.java
@@ -81,7 +81,7 @@ public class HttpLatencyDetectorTest {
                 .url(baseUrl)
                 .rollup(500, TimeUnit.MILLISECONDS)
                 .period(100, TimeUnit.MILLISECONDS)
-                .build());
+                .buildSpec());
         
         assertLatencyAttributesNonNull(entity);
     }
@@ -93,7 +93,7 @@ public class HttpLatencyDetectorTest {
                 .noServiceUp()
                 .rollup(500, TimeUnit.MILLISECONDS)
                 .period(100, TimeUnit.MILLISECONDS)
-                .build());
+                .buildSpec());
         
         // nothing until url is set
         EntityAsserts.assertAttributeEqualsContinually(
@@ -114,7 +114,7 @@ public class HttpLatencyDetectorTest {
                 .noServiceUp()
                 .rollup(500, TimeUnit.MILLISECONDS)
                 .period(100, TimeUnit.MILLISECONDS)
-                .build());
+                .buildSpec());
         
         assertLatencyAttributesNonNull(entity);
     }
@@ -126,7 +126,7 @@ public class HttpLatencyDetectorTest {
         entity.enrichers().add(HttpLatencyDetector.builder()
                 .url(baseUrl)
                 .period(100, TimeUnit.MILLISECONDS)
-                .build());
+                .buildSpec());
         
         // nothing until url is set
         EntityAsserts.assertAttributeEqualsContinually(

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/91c4a5d2/policy/src/test/java/org/apache/brooklyn/policy/enricher/RebindEnricherTest.java
----------------------------------------------------------------------
diff --git a/policy/src/test/java/org/apache/brooklyn/policy/enricher/RebindEnricherTest.java
b/policy/src/test/java/org/apache/brooklyn/policy/enricher/RebindEnricherTest.java
index f717dad..21124ae 100644
--- a/policy/src/test/java/org/apache/brooklyn/policy/enricher/RebindEnricherTest.java
+++ b/policy/src/test/java/org/apache/brooklyn/policy/enricher/RebindEnricherTest.java
@@ -79,7 +79,7 @@ public class RebindEnricherTest extends RebindTestFixtureWithApp {
                 .rollup(Duration.of(50, TimeUnit.MILLISECONDS))
                 .period(Duration.of(10, TimeUnit.MILLISECONDS))
                 .url(baseUrl)
-                .build());
+                .buildSpec());
         origApp.sensors().set(Attributes.SERVICE_UP, true);
         
         TestApplication newApp = rebind();


Mime
View raw message