summaryrefslogtreecommitdiffstats
path: root/vespaclient-container-plugin/src/test/java
diff options
context:
space:
mode:
authorJon Marius Venstad <jonmv@users.noreply.github.com>2021-06-08 16:50:58 +0200
committerGitHub <noreply@github.com>2021-06-08 16:50:58 +0200
commitce8501ed3ac9199d85cc4090c794940cb75e0b40 (patch)
treefa731945378b5a33bc087f0c7f3c39a8332332f3 /vespaclient-container-plugin/src/test/java
parent26b6320ab8fd8100028da9c1de6cf66c41f77a41 (diff)
parent1e6e0ec006aef053688d1217cc6f1d88453ae748 (diff)
Merge pull request #18168 from vespa-engine/jonmv/vespa-feed-client
Document API errors are BAD_GATEWAY
Diffstat (limited to 'vespaclient-container-plugin/src/test/java')
-rw-r--r--vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/resource/DocumentV1ApiTest.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/resource/DocumentV1ApiTest.java b/vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/resource/DocumentV1ApiTest.java
index 6f1b0466350..a0f6fd45dd8 100644
--- a/vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/resource/DocumentV1ApiTest.java
+++ b/vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/resource/DocumentV1ApiTest.java
@@ -330,6 +330,7 @@ public class DocumentV1ApiTest {
assertEquals(400, response.getStatus());
// DELETE with namespace and document type is a restricted visit which deletes visited documents.
+ // When visiting fails fatally, a 502 BAD GATEWAY is returned.
access.expect(tokens.subList(0, 1));
access.expect(parameters -> {
assertEquals("(false) and (music) and (id.namespace=='space')", parameters.getDocumentSelection());
@@ -351,7 +352,7 @@ public class DocumentV1ApiTest {
" \"pathId\": \"/document/v1/space/music/docid\"," +
" \"message\": \"boom\"" +
"}", response.readAll());
- assertEquals(500, response.getStatus());
+ assertEquals(502, response.getStatus());
// DELETE at the root is also a deletion visit. These also require a selection.
access.expect(parameters -> {
@@ -386,7 +387,7 @@ public class DocumentV1ApiTest {
" \"documents\": []," +
" \"message\": \"error\"" +
"}", response.readAll());
- assertEquals(500, response.getStatus());
+ assertEquals(502, response.getStatus());
// GET with namespace, document type and number is a restricted visit.
access.expect(parameters -> {
@@ -649,12 +650,12 @@ public class DocumentV1ApiTest {
" \"pathId\": \"/document/v1/space/music/number/1/two\"," +
" \"message\": \"error\"" +
"}", response1.readAll());
- assertEquals(500, response1.getStatus());
+ assertEquals(502, response1.getStatus());
assertSameJson("{" +
" \"pathId\": \"/document/v1/space/music/number/1/two\"," +
" \"message\": \"error\"" +
"}", response2.readAll());
- assertEquals(500, response2.getStatus());
+ assertEquals(502, response2.getStatus());
// Request response does not arrive before timeout has passed.
AtomicReference<ResponseHandler> handler = new AtomicReference<>();