diff options
author | Håkon Hallingstad <hakon@oath.com> | 2019-01-03 19:54:11 +0100 |
---|---|---|
committer | Håkon Hallingstad <hakon@oath.com> | 2019-01-03 19:54:11 +0100 |
commit | cf70bfb260fa8731617a327b56be433128aa0450 (patch) | |
tree | ddf55127282b97088ce301c51b46737c5ca7692e /service-monitor/src/test/java | |
parent | 5d9957af203d16c448ca34a9d167e3587b3c7820 (diff) |
Typed flag classes
This reintroduces the non-generic flag classes:
- a value() returns the primitive type for flags wrapping a primitive type
- easier to use in testing
- Serializer is moved to internals of typed class
Defines the flag backed by boolean BooleanFlag instead of FeatureFlag since not
all boolean flags are necessarily guarding a feature.
Diffstat (limited to 'service-monitor/src/test/java')
-rw-r--r-- | service-monitor/src/test/java/com/yahoo/vespa/service/health/HealthMonitorManagerTest.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/service-monitor/src/test/java/com/yahoo/vespa/service/health/HealthMonitorManagerTest.java b/service-monitor/src/test/java/com/yahoo/vespa/service/health/HealthMonitorManagerTest.java index 39147955d4c..78b0bed0e6f 100644 --- a/service-monitor/src/test/java/com/yahoo/vespa/service/health/HealthMonitorManagerTest.java +++ b/service-monitor/src/test/java/com/yahoo/vespa/service/health/HealthMonitorManagerTest.java @@ -7,7 +7,7 @@ import com.yahoo.vespa.applicationmodel.ClusterId; import com.yahoo.vespa.applicationmodel.ConfigId; import com.yahoo.vespa.applicationmodel.ServiceStatus; import com.yahoo.vespa.applicationmodel.ServiceType; -import com.yahoo.vespa.flags.Flag; +import com.yahoo.vespa.flags.BooleanFlag; import com.yahoo.vespa.service.duper.ConfigServerApplication; import com.yahoo.vespa.service.duper.ControllerHostApplication; import com.yahoo.vespa.service.duper.DuperModelManager; @@ -33,8 +33,7 @@ import static org.mockito.Mockito.when; public class HealthMonitorManagerTest { private final ConfigServerApplication configServerApplication = new ConfigServerApplication(); private final DuperModelManager duperModel = mock(DuperModelManager.class); - @SuppressWarnings("unchecked") - private final Flag<Boolean> monitorInfra = (Flag<Boolean>) mock(Flag.class); + private final BooleanFlag monitorInfra = mock(BooleanFlag.class); private final ApplicationHealthMonitor monitor = mock(ApplicationHealthMonitor.class); private final ApplicationHealthMonitorFactory monitorFactory = mock(ApplicationHealthMonitorFactory.class); private final HealthMonitorManager manager = new HealthMonitorManager(duperModel, monitorInfra, monitorFactory); |