diff options
author | Jon Bratseth <bratseth@oath.com> | 2018-02-26 09:12:06 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@oath.com> | 2018-02-26 09:12:06 +0100 |
commit | 5e444ba5af219de555edeeb78aeeaaaae9fd8335 (patch) | |
tree | 3d5d8ca68b9c11c76631f228e8ca8edcac0334ca /clustercontroller-apps | |
parent | 3777557b0069026d0ba5ace3ff66fca6c7354d92 (diff) |
Nonfunctional changes only
Diffstat (limited to 'clustercontroller-apps')
4 files changed, 28 insertions, 17 deletions
diff --git a/clustercontroller-apps/src/test/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerClusterConfigurerTest.java b/clustercontroller-apps/src/test/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerClusterConfigurerTest.java index f437e6aa67d..330174f0313 100644 --- a/clustercontroller-apps/src/test/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerClusterConfigurerTest.java +++ b/clustercontroller-apps/src/test/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerClusterConfigurerTest.java @@ -6,12 +6,17 @@ import com.yahoo.cloud.config.ZookeepersConfig; import com.yahoo.jdisc.Metric; import com.yahoo.vespa.config.content.FleetcontrollerConfig; import com.yahoo.vespa.config.content.StorDistributionConfig; -import junit.framework.TestCase; +import org.junit.Test; import java.util.Map; -public class ClusterControllerClusterConfigurerTest extends TestCase { +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; +public class ClusterControllerClusterConfigurerTest { + + @Test public void testSimple() throws Exception { ClusterController controller = new ClusterController(); StorDistributionConfig.Builder distributionConfig = new StorDistributionConfig.Builder(); diff --git a/clustercontroller-apps/src/test/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerTest.java b/clustercontroller-apps/src/test/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerTest.java index fcef483e7d7..b86d9a561d3 100644 --- a/clustercontroller-apps/src/test/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerTest.java +++ b/clustercontroller-apps/src/test/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerTest.java @@ -8,13 +8,18 @@ package com.yahoo.vespa.clustercontroller.apps.clustercontroller; import com.yahoo.jdisc.Metric; import com.yahoo.vespa.clustercontroller.core.FleetController; import com.yahoo.vespa.clustercontroller.core.FleetControllerOptions; -import junit.framework.TestCase; +import org.junit.Before; +import org.junit.Test; import java.util.Map; -public class ClusterControllerTest extends TestCase { +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +public class ClusterControllerTest { private FleetControllerOptions options = new FleetControllerOptions("storage"); + private Metric metric = new Metric() { @Override public void set(String s, Number number, Context context) {} @@ -24,6 +29,7 @@ public class ClusterControllerTest extends TestCase { public Context createContext(Map<String, ?> stringMap) { return null; } }; + @Before public void setUp() { options = new FleetControllerOptions("storage"); options.zooKeeperServerAddress = null; @@ -31,9 +37,10 @@ public class ClusterControllerTest extends TestCase { options.slobrokConnectionSpecs = null; } + @Test public void testSimple() throws Exception { - // Cluster controller object keeps state and should never be remade, so should - // inject nothing + // Cluster controller object keeps state and should never be remade, so should + // inject nothing ClusterController cc = new ClusterController(); cc.setOptions("storage", options, metric); cc.setOptions("storage", options, metric); @@ -45,6 +52,7 @@ public class ClusterControllerTest extends TestCase { cc.deconstruct(); } + @Test public void testShutdownException() throws Exception { ClusterController cc = new ClusterController() { void shutdownController(FleetController controller) throws Exception { diff --git a/clustercontroller-apps/src/test/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/StateRestApiV2HandlerTest.java b/clustercontroller-apps/src/test/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/StateRestApiV2HandlerTest.java index dbc7834a601..e972d2ead39 100644 --- a/clustercontroller-apps/src/test/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/StateRestApiV2HandlerTest.java +++ b/clustercontroller-apps/src/test/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/StateRestApiV2HandlerTest.java @@ -3,16 +3,16 @@ package com.yahoo.vespa.clustercontroller.apps.clustercontroller; import com.yahoo.cloud.config.ClusterInfoConfig; import com.yahoo.vespa.clustercontroller.core.restapiv2.ClusterControllerStateRestAPI; -import junit.framework.TestCase; +import org.junit.Test; import java.util.Map; import java.util.TreeMap; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.ThreadPoolExecutor; -import java.util.concurrent.TimeUnit; -public class StateRestApiV2HandlerTest extends TestCase { +import static org.junit.Assert.assertEquals; +public class StateRestApiV2HandlerTest { + + @Test public void testNoMatchingSockets() { ClusterController controller = new ClusterController(); ClusterInfoConfig config = new ClusterInfoConfig( @@ -21,6 +21,7 @@ public class StateRestApiV2HandlerTest extends TestCase { new StateRestApiV2Handler(controller, config, StateRestApiV2Handler.testOnlyContext()); } + @Test public void testMappingOfIndexToClusterControllers() { ClusterInfoConfig.Builder builder = new ClusterInfoConfig.Builder() .clusterId("cluster-id") diff --git a/clustercontroller-apps/src/test/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/StatusHandlerTest.java b/clustercontroller-apps/src/test/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/StatusHandlerTest.java index 49e0a637368..49537597f83 100644 --- a/clustercontroller-apps/src/test/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/StatusHandlerTest.java +++ b/clustercontroller-apps/src/test/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/StatusHandlerTest.java @@ -1,14 +1,11 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.clustercontroller.apps.clustercontroller; -import junit.framework.TestCase; +import org.junit.Test; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.ThreadPoolExecutor; -import java.util.concurrent.TimeUnit; - -public class StatusHandlerTest extends TestCase { +public class StatusHandlerTest { + @Test public void testSimple() { ClusterController controller = new ClusterController(); StatusHandler handler = new StatusHandler(controller, StatusHandler.testOnlyContext()); |