diff options
author | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2022-07-29 15:44:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-29 15:44:31 +0200 |
commit | 372f6d7371d42ef23b543d4349cfeabf25ac400b (patch) | |
tree | 9af9d03b14f4a3cf4747428071574ec668e3f3f7 /clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/DistributionBitCountTest.java | |
parent | 5aa9bb607b7d4262c8ea13d20671f7264c3c59c5 (diff) | |
parent | 4b53d0d135fcacc5964b2720678642f182fd15d1 (diff) |
Merge pull request #23555 from vespa-engine/bjorncs/more-junit5v8.26.15
Bjorncs/more junit5
Diffstat (limited to 'clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/DistributionBitCountTest.java')
-rw-r--r-- | clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/DistributionBitCountTest.java | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/DistributionBitCountTest.java b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/DistributionBitCountTest.java index e9d3a9cf83e..d3b0addbb13 100644 --- a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/DistributionBitCountTest.java +++ b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/DistributionBitCountTest.java @@ -6,12 +6,12 @@ import com.yahoo.vdslib.state.ClusterState; import com.yahoo.vdslib.state.NodeState; import com.yahoo.vdslib.state.NodeType; import com.yahoo.vdslib.state.State; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.List; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; public class DistributionBitCountTest extends FleetControllerTest { @@ -37,7 +37,7 @@ public class DistributionBitCountTest extends FleetControllerTest { * Test that then altering config to increased bit count, that a new system state is not sent out (and not altered) if a storagenode needs it to be no further split. */ @Test - public void testDistributionBitCountConfigIncrease() throws Exception { + void testDistributionBitCountConfigIncrease() throws Exception { setUpSystem("DistributionBitCountTest::testDistributionBitCountConfigIncrease"); options.distributionBits = 20; fleetController.updateOptions(options); @@ -53,7 +53,7 @@ public class DistributionBitCountTest extends FleetControllerTest { * Test that then altering config to decrease bit count, that a new system state is sent out with that bit count. */ @Test - public void testDistributionBitCountConfigDecrease() throws Exception { + void testDistributionBitCountConfigDecrease() throws Exception { setUpSystem("DistributionBitCountTest::testDistributionBitCountConfigDecrease"); options.distributionBits = 12; fleetController.updateOptions(options); @@ -69,7 +69,7 @@ public class DistributionBitCountTest extends FleetControllerTest { * node now being lowest, the fleetcontroller adjusts to use that bit in system state. */ @Test - public void testStorageNodeReportingHigherBitCount() throws Exception { + void testStorageNodeReportingHigherBitCount() throws Exception { setUpSystem("DistributionBitCountTest::testStorageNodeReportingHigherBitCount"); nodes.get(1).setNodeState(new NodeState(NodeType.STORAGE, State.UP).setMinUsedBits(11)); @@ -78,12 +78,11 @@ public class DistributionBitCountTest extends FleetControllerTest { ClusterState startState = waitForState("version:\\d+ bits:11 distributor:10 storage:10"); nodes.get(1).setNodeState(new NodeState(NodeType.STORAGE, State.UP).setMinUsedBits(12)); - assertEquals(startState + "->" + fleetController.getSystemState(), - startState.getVersion(), fleetController.getSystemState().getVersion()); + assertEquals(startState.getVersion(), fleetController.getSystemState().getVersion(), startState + "->" + fleetController.getSystemState()); for (int i = 0; i < 10; ++i) { // nodes is array of [distr.0, stor.0, distr.1, stor.1, ...] and we just want the storage nodes - nodes.get(i*2 + 1).setNodeState(new NodeState(NodeType.STORAGE, State.UP).setMinUsedBits(17)); + nodes.get(i * 2 + 1).setNodeState(new NodeState(NodeType.STORAGE, State.UP).setMinUsedBits(17)); } assertEquals(startState.getVersion() + 1, waitForState("version:\\d+ bits:17 distributor:10 storage:10").getVersion()); } @@ -93,7 +92,7 @@ public class DistributionBitCountTest extends FleetControllerTest { * Test that then storage node report lower bit count, and then becomes the smallest, the fleetcontroller adjusts to use that bit in system state. */ @Test - public void testStorageNodeReportingLowerBitCount() throws Exception { + void testStorageNodeReportingLowerBitCount() throws Exception { setUpSystem("DistributionBitCountTest::testStorageNodeReportingLowerBitCount"); nodes.get(1).setNodeState(new NodeState(NodeType.STORAGE, State.UP).setMinUsedBits(13)); |