aboutsummaryrefslogtreecommitdiffstats
path: root/configserver/src/test/java/com/yahoo/vespa/config/server/http
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2022-02-23 11:18:08 +0100
committerJon Bratseth <bratseth@gmail.com>2022-02-23 11:18:08 +0100
commitd49afeaea9c407da990ed494266a0cc8374f48c1 (patch)
treee088490857e4565c18f7333436d9087dfc01b27b /configserver/src/test/java/com/yahoo/vespa/config/server/http
parentf0ae94a10d7a83ddee2eaa484f34f0bd4dd01e02 (diff)
Replace 'out of capacity' by 'node allocation failure'
Diffstat (limited to 'configserver/src/test/java/com/yahoo/vespa/config/server/http')
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/http/v2/SessionPrepareHandlerTest.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/http/v2/SessionPrepareHandlerTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/http/v2/SessionPrepareHandlerTest.java
index 0b8b142e3aa..9071b12507e 100644
--- a/configserver/src/test/java/com/yahoo/vespa/config/server/http/v2/SessionPrepareHandlerTest.java
+++ b/configserver/src/test/java/com/yahoo/vespa/config/server/http/v2/SessionPrepareHandlerTest.java
@@ -8,7 +8,7 @@ import com.yahoo.config.provision.ApplicationLockException;
import com.yahoo.config.provision.ApplicationName;
import com.yahoo.config.provision.DockerImage;
import com.yahoo.config.provision.InstanceName;
-import com.yahoo.config.provision.OutOfCapacityException;
+import com.yahoo.config.provision.NodeAllocationException;
import com.yahoo.config.provision.TenantName;
import com.yahoo.container.jdisc.HttpResponse;
import com.yahoo.jdisc.http.HttpRequest;
@@ -246,15 +246,15 @@ public class SessionPrepareHandlerTest extends SessionHandlerTest {
@Test
public void test_out_of_capacity_response() throws IOException {
long sessionId = applicationRepository.createSession(applicationId(), timeoutBudget, app);
- String exceptionMessage = "Out of capacity";
+ String exceptionMessage = "Node allocation failure";
FailingSessionPrepareHandler handler = new FailingSessionPrepareHandler(SessionPrepareHandler.testContext(),
applicationRepository,
configserverConfig,
- new OutOfCapacityException(exceptionMessage));
+ new NodeAllocationException(exceptionMessage));
HttpResponse response = handler.handle(createTestRequest(pathPrefix, HttpRequest.Method.PUT, Cmd.PREPARED, sessionId));
assertEquals(400, response.getStatus());
Slime data = getData(response);
- assertEquals(HttpErrorResponse.ErrorCode.OUT_OF_CAPACITY.name(), data.get().field("error-code").asString());
+ assertEquals(HttpErrorResponse.ErrorCode.NODE_ALLOCATION_FAILURE.name(), data.get().field("error-code").asString());
assertEquals(exceptionMessage, data.get().field("message").asString());
}