aboutsummaryrefslogtreecommitdiffstats
path: root/container-core/src/test/java/com/yahoo/container/handler/LogHandlerTest.java
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2021-04-14 16:28:11 +0200
committerJon Marius Venstad <venstad@gmail.com>2021-04-14 16:28:11 +0200
commitf62d7b095c353508103f0f038e1f957435d54a38 (patch)
tree11ae6f185ae78179011bec39b6d5fdfe889c1dc6 /container-core/src/test/java/com/yahoo/container/handler/LogHandlerTest.java
parentfd9b726786f4c00b276f2d84fd0a3593a0c406eb (diff)
Move MaxPendingContentChannelStream to container-core and use it thorugh max pending on HttpResponse
Diffstat (limited to 'container-core/src/test/java/com/yahoo/container/handler/LogHandlerTest.java')
-rw-r--r--container-core/src/test/java/com/yahoo/container/handler/LogHandlerTest.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/container-core/src/test/java/com/yahoo/container/handler/LogHandlerTest.java b/container-core/src/test/java/com/yahoo/container/handler/LogHandlerTest.java
index afe57579a97..38683c75375 100644
--- a/container-core/src/test/java/com/yahoo/container/handler/LogHandlerTest.java
+++ b/container-core/src/test/java/com/yahoo/container/handler/LogHandlerTest.java
@@ -2,6 +2,7 @@
package com.yahoo.container.handler;
import com.yahoo.container.jdisc.AsyncHttpResponse;
+import com.yahoo.container.jdisc.ContentChannelOutputStream;
import com.yahoo.container.jdisc.HttpRequest;
import com.yahoo.jdisc.handler.ReadableContentChannel;
import com.yahoo.yolean.Exceptions;
@@ -28,7 +29,7 @@ public class LogHandlerTest {
String uri = "http://myhost.com:1111/logs?from=1000&to=2000";
AsyncHttpResponse response = logHandler.handle(HttpRequest.createTestRequest(uri, com.yahoo.jdisc.http.HttpRequest.Method.GET));
ReadableContentChannel out = new ReadableContentChannel();
- new Thread(() -> Exceptions.uncheck(() -> response.render(null, out, null))).start();
+ new Thread(() -> Exceptions.uncheck(() -> response.render(new ContentChannelOutputStream(out), out, null))).start();
String expectedResponse = "newer log";
assertEquals(expectedResponse, new String(out.toStream().readAllBytes(), UTF_8));
}
@@ -37,7 +38,7 @@ public class LogHandlerTest {
String uri = "http://myhost.com:1111/logs?from=0&to=1000";
AsyncHttpResponse response = logHandler.handle(HttpRequest.createTestRequest(uri, com.yahoo.jdisc.http.HttpRequest.Method.GET));
ReadableContentChannel out = new ReadableContentChannel();
- new Thread(() -> Exceptions.uncheck(() -> response.render(null, out, null))).start();
+ new Thread(() -> Exceptions.uncheck(() -> response.render(new ContentChannelOutputStream(out), out, null))).start();
String expectedResponse = "older log";
assertEquals(expectedResponse, new String(out.toStream().readAllBytes(), UTF_8));
}