Upgraded HttpCore to version 5.2-beta2
This commit is contained in:
parent
26dcc6f914
commit
9e0ff508e8
|
@ -49,6 +49,8 @@ import java.util.concurrent.Future;
|
|||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
import io.reactivex.rxjava3.core.Flowable;
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers;
|
||||
import org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient;
|
||||
import org.apache.hc.client5.http.protocol.HttpClientContext;
|
||||
import org.apache.hc.core5.concurrent.FutureCallback;
|
||||
|
@ -61,8 +63,8 @@ import org.apache.hc.core5.http.nio.AsyncRequestProducer;
|
|||
import org.apache.hc.core5.http.nio.support.AsyncRequestBuilder;
|
||||
import org.apache.hc.core5.reactive.ReactiveEntityProducer;
|
||||
import org.apache.hc.core5.reactive.ReactiveResponseConsumer;
|
||||
import org.apache.hc.core5.testing.reactive.ReactiveTestUtils;
|
||||
import org.apache.hc.core5.testing.reactive.ReactiveTestUtils.StreamDescription;
|
||||
import org.apache.hc.core5.testing.reactive.Reactive3TestUtils;
|
||||
import org.apache.hc.core5.testing.reactive.Reactive3TestUtils.StreamDescription;
|
||||
import org.apache.hc.core5.util.TextUtils;
|
||||
import org.hamcrest.CoreMatchers;
|
||||
import org.junit.Test;
|
||||
|
@ -70,9 +72,6 @@ import org.junit.jupiter.api.Assertions;
|
|||
import org.junit.jupiter.api.Timeout;
|
||||
import org.reactivestreams.Publisher;
|
||||
|
||||
import io.reactivex.Flowable;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
public abstract class AbstractHttpReactiveFundamentalsTest<T extends CloseableHttpAsyncClient> extends AbstractIntegrationTestBase<T> {
|
||||
|
||||
public AbstractHttpReactiveFundamentalsTest(final URIScheme scheme) {
|
||||
|
@ -169,8 +168,7 @@ public abstract class AbstractHttpReactiveFundamentalsTest<T extends CloseableHt
|
|||
public void completed(final Message<HttpResponse, Publisher<ByteBuffer>> result) {
|
||||
final Flowable<ByteBuffer> flowable = Flowable.fromPublisher(result.getBody())
|
||||
.observeOn(Schedulers.io()); // Stream the data on an RxJava scheduler, not a client thread
|
||||
ReactiveTestUtils.consumeStream(flowable)
|
||||
.subscribe(responses::add);
|
||||
Reactive3TestUtils.consumeStream(flowable).subscribe(responses::add);
|
||||
}
|
||||
@Override
|
||||
public void failed(final Exception ex) { }
|
||||
|
@ -308,7 +306,7 @@ public abstract class AbstractHttpReactiveFundamentalsTest<T extends CloseableHt
|
|||
final long seed = 198723L * testCaseNum++;
|
||||
final int length = 1 + new Random(seed).nextInt(maxSize);
|
||||
final AtomicReference<String> expectedHash = new AtomicReference<>();
|
||||
final Flowable<ByteBuffer> stream = ReactiveTestUtils.produceStream(length, expectedHash);
|
||||
final Flowable<ByteBuffer> stream = Reactive3TestUtils.produceStream(length, expectedHash);
|
||||
final StreamingTestCase streamingTestCase = new StreamingTestCase(length, expectedHash, stream);
|
||||
testCases.put((long) length, streamingTestCase);
|
||||
}
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -62,7 +62,7 @@
|
|||
<properties>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<httpcore.version>5.2-beta1</httpcore.version>
|
||||
<httpcore.version>5.2-beta2</httpcore.version>
|
||||
<log4j.version>2.17.0</log4j.version>
|
||||
<brotli.version>0.1.2</brotli.version>
|
||||
<conscrypt.version>2.5.2</conscrypt.version>
|
||||
|
|
Loading…
Reference in New Issue