diff options
Diffstat (limited to 'clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/NodeInfoTest.java')
-rw-r--r-- | clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/NodeInfoTest.java | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/NodeInfoTest.java b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/NodeInfoTest.java index 129c70d1d29..4b068d107bf 100644 --- a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/NodeInfoTest.java +++ b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/NodeInfoTest.java @@ -4,16 +4,14 @@ package com.yahoo.vespa.clustercontroller.core; import com.yahoo.vdslib.state.Node; import com.yahoo.vdslib.state.NodeType; import com.yahoo.vdslib.state.State; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.*; public class NodeInfoTest { @Test - public void unstable_init_flag_is_initially_clear() { + void unstable_init_flag_is_initially_clear() { ClusterFixture fixture = ClusterFixture.forFlatCluster(3); final NodeInfo nodeInfo = fixture.cluster.getNodeInfo(new Node(NodeType.STORAGE, 1)); assertFalse(nodeInfo.recentlyObservedUnstableDuringInit()); @@ -26,7 +24,7 @@ public class NodeInfoTest { } @Test - public void down_edge_during_init_state_marks_as_unstable_init() { + void down_edge_during_init_state_marks_as_unstable_init() { ClusterFixture fixture = fixtureWithNodeMarkedAsUnstableInit(1); final NodeInfo nodeInfo = fixture.cluster.getNodeInfo(new Node(NodeType.STORAGE, 1)); @@ -34,7 +32,7 @@ public class NodeInfoTest { } @Test - public void stopping_edge_during_init_does_not_mark_as_unstable_init() { + void stopping_edge_during_init_does_not_mark_as_unstable_init() { ClusterFixture fixture = ClusterFixture.forFlatCluster(3).reportStorageNodeState(0, State.INITIALIZING); fixture.reportStorageNodeState(0, State.STOPPING); final NodeInfo nodeInfo = fixture.cluster.getNodeInfo(new Node(NodeType.STORAGE, 0)); @@ -48,7 +46,7 @@ public class NodeInfoTest { * from haunting a now stable node. */ @Test - public void zeroing_crash_count_resets_unstable_init_flag() { + void zeroing_crash_count_resets_unstable_init_flag() { ClusterFixture fixture = fixtureWithNodeMarkedAsUnstableInit(1); final NodeInfo nodeInfo = fixture.cluster.getNodeInfo(new Node(NodeType.STORAGE, 1)); @@ -61,7 +59,7 @@ public class NodeInfoTest { * further instabilities and should not clear the unstable init flag. */ @Test - public void non_zero_crash_count_update_does_not_reset_unstable_init_flag() { + void non_zero_crash_count_update_does_not_reset_unstable_init_flag() { ClusterFixture fixture = fixtureWithNodeMarkedAsUnstableInit(1); final NodeInfo nodeInfo = fixture.cluster.getNodeInfo(new Node(NodeType.STORAGE, 1)); @@ -70,7 +68,7 @@ public class NodeInfoTest { } @Test - public void non_zero_crash_count_does_not_implicitly_set_unstable_init_flag() { + void non_zero_crash_count_does_not_implicitly_set_unstable_init_flag() { ClusterFixture fixture = ClusterFixture.forFlatCluster(3); final NodeInfo nodeInfo = fixture.cluster.getNodeInfo(new Node(NodeType.STORAGE, 1)); @@ -79,7 +77,7 @@ public class NodeInfoTest { } @Test - public void down_wanted_state_overrides_config_retired_state() { + void down_wanted_state_overrides_config_retired_state() { ClusterFixture fixture = ClusterFixture.forFlatCluster(3) .markNodeAsConfigRetired(1) .proposeStorageNodeWantedState(1, State.DOWN); @@ -89,7 +87,7 @@ public class NodeInfoTest { } @Test - public void maintenance_wanted_state_overrides_config_retired_state() { + void maintenance_wanted_state_overrides_config_retired_state() { ClusterFixture fixture = ClusterFixture.forFlatCluster(3) .markNodeAsConfigRetired(1) .proposeStorageNodeWantedState(1, State.MAINTENANCE); @@ -99,7 +97,7 @@ public class NodeInfoTest { } @Test - public void retired_state_overrides_default_up_wanted_state() { + void retired_state_overrides_default_up_wanted_state() { final ClusterFixture fixture = ClusterFixture.forFlatCluster(3).markNodeAsConfigRetired(1); NodeInfo nodeInfo = fixture.cluster.getNodeInfo(new Node(NodeType.STORAGE, 1)); |