diff options
author | Harald Musum <musum@yahooinc.com> | 2022-09-15 11:40:43 +0200 |
---|---|---|
committer | Harald Musum <musum@yahooinc.com> | 2022-09-15 11:40:43 +0200 |
commit | 5c528eac65693e4cec73339d4e42d9ddcef680e8 (patch) | |
tree | 3bfec4a78e730fdda7d2fb6162e20ad0d0b11b4e /clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/StateChangeTest.java | |
parent | 886bb1426b970a7bfcf032a5053c68c28480ab2e (diff) |
Cleanup by using supervisor in superclass
Diffstat (limited to 'clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/StateChangeTest.java')
-rw-r--r-- | clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/StateChangeTest.java | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/StateChangeTest.java b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/StateChangeTest.java index 18691fc8747..5868ad723a4 100644 --- a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/StateChangeTest.java +++ b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/StateChangeTest.java @@ -1,8 +1,6 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.clustercontroller.core; -import com.yahoo.jrt.Supervisor; -import com.yahoo.jrt.Transport; import com.yahoo.vdslib.distribution.ConfiguredNode; import com.yahoo.vdslib.state.ClusterState; import com.yahoo.vdslib.state.Node; @@ -14,10 +12,8 @@ import com.yahoo.vespa.clustercontroller.core.database.ZooKeeperDatabaseFactory; import com.yahoo.vespa.clustercontroller.core.status.StatusHandler; import com.yahoo.vespa.clustercontroller.core.testutils.StateWaiter; import com.yahoo.vespa.clustercontroller.utils.util.NoMetricReporter; -import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; - import java.time.Duration; import java.util.ArrayList; import java.util.HashMap; @@ -27,22 +23,18 @@ import java.util.logging.Logger; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; @ExtendWith(CleanupZookeeperLogsOnSuccess.class) public class StateChangeTest extends FleetControllerTest { public static Logger log = Logger.getLogger(StateChangeTest.class.getName()); - private Supervisor supervisor; private FleetController ctrl; private DummyCommunicator communicator; private EventLog eventLog; - @BeforeEach - public void setUp() { - supervisor = new Supervisor(new Transport()); - } - private void initialize(FleetControllerOptions options) throws Exception { List<Node> nodes = new ArrayList<>(); for (int i = 0; i < options.nodes().size(); ++i) { @@ -79,14 +71,6 @@ public class StateChangeTest extends FleetControllerTest { ctrl.tick(); } - public void tearDown() throws Exception { - if (supervisor != null) { - supervisor.transport().shutdown().join(); - supervisor = null; - } - super.tearDown(); - } - private void verifyNodeEvents(Node n, String correct) { String actual = ""; for (NodeEvent e : eventLog.getNodeEvents(n)) { |