summaryrefslogtreecommitdiffstats
path: root/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/restapiv2/SetNodeStateTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/restapiv2/SetNodeStateTest.java')
-rw-r--r--clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/restapiv2/SetNodeStateTest.java23
1 files changed, 3 insertions, 20 deletions
diff --git a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/restapiv2/SetNodeStateTest.java b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/restapiv2/SetNodeStateTest.java
index 1b52194b270..33a962a532d 100644
--- a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/restapiv2/SetNodeStateTest.java
+++ b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/restapiv2/SetNodeStateTest.java
@@ -341,6 +341,7 @@ public class SetNodeStateTest extends StateRestApiTest {
setUp(true);
String wrongUnitMessage = "State can only be set at cluster or node level";
+
try {
restAPI.setUnitState(new SetUnitStateRequestImpl(
"").setNewState("user", "down", "testing"));
@@ -349,8 +350,6 @@ public class SetNodeStateTest extends StateRestApiTest {
assertTrue(e.getMessage().contains(wrongUnitMessage), e.getMessage());
}
- // ... setting at cluster-level is allowed
-
try {
restAPI.setUnitState(new SetUnitStateRequestImpl(
"music/distributor").setNewState("user", "down", "testing"));
@@ -358,16 +357,6 @@ public class SetNodeStateTest extends StateRestApiTest {
} catch (OperationNotSupportedForUnitException e) {
assertTrue(e.getMessage().contains(wrongUnitMessage), e.getMessage());
}
-
- // ... setting at node-level is allowed
-
- try {
- restAPI.setUnitState(new SetUnitStateRequestImpl(
- "music/storage/1/0").setNewState("user", "down", "testing"));
- fail();
- } catch (OperationNotSupportedForUnitException e) {
- assertTrue(e.getMessage().contains(wrongUnitMessage), e.getMessage());
- }
}
@Test
@@ -403,12 +392,6 @@ public class SetNodeStateTest extends StateRestApiTest {
fail();
} catch (MissingUnitException e) {
}
- try {
- restAPI.setUnitState(new SetUnitStateRequestImpl(
- "music/storage/1/bar").setNewState("user", "down", "testing"));
- fail();
- } catch (MissingUnitException e) {
- }
}
@Test
@@ -520,7 +503,7 @@ public class SetNodeStateTest extends StateRestApiTest {
// important to test (and expected to happen) for requests that have dependencies on cluster
// state version publishing.
@Test
- void leadership_loss_fails_set_node_state_request() throws Exception {
+ void leadership_loss_fails_set_node_state_request() {
Throwable exception = assertThrows(UnknownMasterException.class, () -> {
SetNodeStateRequest request = createDummySetNodeStateRequest();
@@ -538,7 +521,7 @@ public class SetNodeStateTest extends StateRestApiTest {
}
@Test
- void deadline_exceeded_fails_set_node_state_request() throws Exception {
+ void deadline_exceeded_fails_set_node_state_request() {
Throwable exception = assertThrows(DeadlineExceededException.class, () -> {
SetNodeStateRequest request = createDummySetNodeStateRequest();