|
40 | 40 | import java.util.concurrent.TimeUnit; |
41 | 41 |
|
42 | 42 | import org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient; |
| 43 | +import org.apache.hc.client5.http.protocol.HttpClientContext; |
43 | 44 | import org.apache.hc.client5.http.sse.impl.SseParser; |
44 | 45 | import org.apache.hc.core5.concurrent.FutureCallback; |
45 | 46 | import org.apache.hc.core5.function.Supplier; |
|
51 | 52 | import org.apache.hc.core5.http.nio.AsyncRequestProducer; |
52 | 53 | import org.apache.hc.core5.http.nio.AsyncResponseConsumer; |
53 | 54 | import org.apache.hc.core5.http.nio.HandlerFactory; |
54 | | -import org.apache.hc.core5.http.protocol.BasicHttpContext; |
55 | 55 | import org.apache.hc.core5.http.protocol.HttpContext; |
56 | 56 | import org.apache.hc.core5.io.CloseMode; |
57 | 57 | import org.apache.hc.core5.reactor.IOReactorStatus; |
@@ -102,10 +102,11 @@ public void onClosed() { |
102 | 102 | final AsyncResponseConsumer<Void> c = fake.lastConsumer; |
103 | 103 | assertNotNull(c, "consumer captured"); |
104 | 104 |
|
| 105 | + final HttpContext context = HttpClientContext.create(); |
105 | 106 | c.consumeResponse( |
106 | 107 | new BasicHttpResponse(HttpStatus.SC_OK, "OK"), |
107 | 108 | new TestEntityDetails("text/event-stream"), |
108 | | - new BasicHttpContext(), // FIX: concrete HttpContext |
| 109 | + context, |
109 | 110 | new FutureCallback<Void>() { |
110 | 111 | @Override |
111 | 112 | public void completed(final Void result) { |
|
0 commit comments