use of com.yahoo.vdslib.state.Node in project vespa by vespa-engine.
the class EventLogTest method initialize.
private void initialize(MetricUpdater updater) {
eventLog = new EventLog(new FakeTimer(), updater);
// Avoid NullPointerException...
NodeInfo nodeInfo = mock(NodeInfo.class);
when(nodeEvent.getNode()).thenReturn(nodeInfo);
Node node = mock(Node.class);
when(nodeInfo.getNode()).thenReturn(node);
}
use of com.yahoo.vdslib.state.Node in project vespa by vespa-engine.
the class NodeInfoTest method stopping_edge_during_init_does_not_mark_as_unstable_init.
@Test
public 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));
assertFalse(nodeInfo.recentlyObservedUnstableDuringInit());
}
use of com.yahoo.vdslib.state.Node in project vespa by vespa-engine.
the class NodeInfoTest method maintenance_wanted_state_overrides_config_retired_state.
@Test
public void maintenance_wanted_state_overrides_config_retired_state() {
ClusterFixture fixture = ClusterFixture.forFlatCluster(3).markNodeAsConfigRetired(1).proposeStorageNodeWantedState(1, State.MAINTENANCE);
NodeInfo nodeInfo = fixture.cluster.getNodeInfo(new Node(NodeType.STORAGE, 1));
assertEquals(State.MAINTENANCE, nodeInfo.getWantedState().getState());
}
use of com.yahoo.vdslib.state.Node in project vespa by vespa-engine.
the class NodeInfoTest method non_zero_crash_count_does_not_implicitly_set_unstable_init_flag.
@Test
public 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));
nodeInfo.setPrematureCrashCount(1);
assertFalse(nodeInfo.recentlyObservedUnstableDuringInit());
}
use of com.yahoo.vdslib.state.Node in project vespa by vespa-engine.
the class NodeInfoTest method unstable_init_flag_is_initially_clear.
@Test
public 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());
}
Aggregations