use of com.yahoo.vespa.clustercontroller.core.restapiv2.requests.SetNodeStateRequest in project vespa by vespa-engine.
the class SetNodeStateTest method deadline_exceeded_fails_set_node_state_request.
@Test
public void deadline_exceeded_fails_set_node_state_request() throws Exception {
expectedException.expectMessage("Task exceeded its version wait deadline");
expectedException.expect(DeadlineExceededException.class);
SetNodeStateRequest request = createDummySetNodeStateRequest();
request.handleFailure(RemoteClusterControllerTask.FailureCondition.DEADLINE_EXCEEDED);
request.getResult();
}
use of com.yahoo.vespa.clustercontroller.core.restapiv2.requests.SetNodeStateRequest in project vespa by vespa-engine.
the class SetNodeStateTest method set_node_state_requests_not_initially_marked_as_failed.
@Test
public void set_node_state_requests_not_initially_marked_as_failed() {
SetNodeStateRequest request = createDummySetNodeStateRequest();
assertFalse(request.isFailed());
}
use of com.yahoo.vespa.clustercontroller.core.restapiv2.requests.SetNodeStateRequest in project vespa by vespa-engine.
the class SetNodeStateTest method set_node_state_requests_are_by_default_tagged_as_having_version_ack_dependency.
@Test
public void set_node_state_requests_are_by_default_tagged_as_having_version_ack_dependency() {
SetNodeStateRequest request = createDummySetNodeStateRequest();
assertTrue(request.hasVersionAckDependency());
}
use of com.yahoo.vespa.clustercontroller.core.restapiv2.requests.SetNodeStateRequest in project vespa by vespa-engine.
the class SetNodeStateTest method leadership_loss_fails_set_node_state_request.
// Technically, this failure mode currently applies to all requests, but it's only really
// important to test (and expected to happen) for requests that have dependencies on cluster
// state version publishing.
@Test
public void leadership_loss_fails_set_node_state_request() throws Exception {
expectedException.expectMessage("Leadership lost before request could complete");
expectedException.expect(UnknownMasterException.class);
SetNodeStateRequest request = createDummySetNodeStateRequest();
request.handleFailure(RemoteClusterControllerTask.FailureCondition.LEADERSHIP_LOST);
request.getResult();
}
use of com.yahoo.vespa.clustercontroller.core.restapiv2.requests.SetNodeStateRequest in project vespa by vespa-engine.
the class SetNodeStateTest method set_node_state_requests_may_override_version_ack_dependency.
@Test
public void set_node_state_requests_may_override_version_ack_dependency() {
SetNodeStateRequest request = new SetNodeStateRequest(createDummyId(), new SetUnitStateRequestImpl("music/storage/1").setNewState("user", "maintenance", "whatever reason.").setResponseWait(SetUnitStateRequest.ResponseWait.NO_WAIT));
assertFalse(request.hasVersionAckDependency());
}
Aggregations