Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import java.util.concurrent.TimeUnit;

import org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient;
import org.apache.hc.client5.http.protocol.HttpClientContext;
import org.apache.hc.client5.http.sse.impl.SseParser;
import org.apache.hc.core5.concurrent.FutureCallback;
import org.apache.hc.core5.function.Supplier;
Expand All @@ -51,7 +52,6 @@
import org.apache.hc.core5.http.nio.AsyncRequestProducer;
import org.apache.hc.core5.http.nio.AsyncResponseConsumer;
import org.apache.hc.core5.http.nio.HandlerFactory;
import org.apache.hc.core5.http.protocol.BasicHttpContext;
import org.apache.hc.core5.http.protocol.HttpContext;
import org.apache.hc.core5.io.CloseMode;
import org.apache.hc.core5.reactor.IOReactorStatus;
Expand Down Expand Up @@ -102,10 +102,11 @@ public void onClosed() {
final AsyncResponseConsumer<Void> c = fake.lastConsumer;
assertNotNull(c, "consumer captured");

final HttpContext context = HttpClientContext.create();
c.consumeResponse(
new BasicHttpResponse(HttpStatus.SC_OK, "OK"),
new TestEntityDetails("text/event-stream"),
new BasicHttpContext(), // FIX: concrete HttpContext
context,
new FutureCallback<Void>() {
@Override
public void completed(final Void result) {
Expand Down