summaryrefslogtreecommitdiffstats
path: root/vespaclient-container-plugin/src/test/java/com/yahoo/vespa/http/server/VersionsTestCase.java
diff options
context:
space:
mode:
Diffstat (limited to 'vespaclient-container-plugin/src/test/java/com/yahoo/vespa/http/server/VersionsTestCase.java')
-rw-r--r--vespaclient-container-plugin/src/test/java/com/yahoo/vespa/http/server/VersionsTestCase.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/vespaclient-container-plugin/src/test/java/com/yahoo/vespa/http/server/VersionsTestCase.java b/vespaclient-container-plugin/src/test/java/com/yahoo/vespa/http/server/VersionsTestCase.java
index ab055a54133..d6f605b0379 100644
--- a/vespaclient-container-plugin/src/test/java/com/yahoo/vespa/http/server/VersionsTestCase.java
+++ b/vespaclient-container-plugin/src/test/java/com/yahoo/vespa/http/server/VersionsTestCase.java
@@ -5,6 +5,7 @@ import com.yahoo.collections.Tuple2;
import com.yahoo.container.jdisc.HttpResponse;
import org.junit.Test;
+import java.io.ByteArrayOutputStream;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
@@ -77,6 +78,12 @@ public class VersionsTestCase {
public void testTooLarge() throws Exception {
Tuple2<HttpResponse, Integer> v = FeedHandler.doCheckProtocolVersion(TOO_LARGE_NUMBER);
assertThat(v.first, instanceOf(ErrorHttpResponse.class));
+ ByteArrayOutputStream errorMsg = new ByteArrayOutputStream();
+ ErrorHttpResponse errorResponse = (ErrorHttpResponse) v.first;
+ errorResponse.render(errorMsg);
+ assertThat(errorMsg.toString(),
+ is("Could not parse X-Yahoo-Feed-Protocol-Versionheader of request (values: [1000000000]). " +
+ "Server supports protocol versions [2, 3]"));
assertThat(v.second, is(-1));
}