diff options
Diffstat (limited to 'flags/src/test')
-rw-r--r-- | flags/src/test/java/com/yahoo/vespa/flags/FlagsTest.java | 14 | ||||
-rw-r--r-- | flags/src/test/java/com/yahoo/vespa/flags/PermanentFlagsTest.java | 25 |
2 files changed, 26 insertions, 13 deletions
diff --git a/flags/src/test/java/com/yahoo/vespa/flags/FlagsTest.java b/flags/src/test/java/com/yahoo/vespa/flags/FlagsTest.java index 8882a15e526..48ed318af41 100644 --- a/flags/src/test/java/com/yahoo/vespa/flags/FlagsTest.java +++ b/flags/src/test/java/com/yahoo/vespa/flags/FlagsTest.java @@ -4,8 +4,6 @@ package com.yahoo.vespa.flags; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.node.BooleanNode; -import com.yahoo.vespa.flags.custom.HostResources; -import com.yahoo.vespa.flags.custom.SharedHost; import org.junit.Test; import org.mockito.ArgumentCaptor; @@ -109,17 +107,7 @@ public class FlagsTest { List.of(instance)); } - @Test - public void testSharedHostFlag() { - SharedHost sharedHost = new SharedHost(List.of(new HostResources( - 4.0, 16.0, 50.0, 0.3, - "fast", "local", - 10)), - null); - testGeneric(Flags.SHARED_HOST, sharedHost); - } - - private <T> void testGeneric(UnboundFlag<T, ?, ?> unboundFlag, T value) { + static <T> void testGeneric(UnboundFlag<T, ?, ?> unboundFlag, T value) { FlagSource source = mock(FlagSource.class); Flag<T, ?> flag = unboundFlag.bindTo(source); diff --git a/flags/src/test/java/com/yahoo/vespa/flags/PermanentFlagsTest.java b/flags/src/test/java/com/yahoo/vespa/flags/PermanentFlagsTest.java new file mode 100644 index 00000000000..3f43682cfb9 --- /dev/null +++ b/flags/src/test/java/com/yahoo/vespa/flags/PermanentFlagsTest.java @@ -0,0 +1,25 @@ +package com.yahoo.vespa.flags;// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + +import com.yahoo.vespa.flags.custom.HostResources; +import com.yahoo.vespa.flags.custom.SharedHost; +import org.junit.jupiter.api.Test; + +import java.util.List; + +import static com.yahoo.vespa.flags.FlagsTest.testGeneric; + +/** + * @author bjorncs + */ +class PermanentFlagsTest { + @Test + public void testSharedHostFlag() { + SharedHost sharedHost = new SharedHost(List.of(new HostResources( + 4.0, 16.0, 50.0, 0.3, + "fast", "local", + 10)), + null); + testGeneric(PermanentFlags.SHARED_HOST, sharedHost); + } + +}
\ No newline at end of file |