Class NewConnectionPoolSpec.TestSetup
java.lang.Object
org.apache.pekko.http.impl.engine.client.NewConnectionPoolSpec.TestSetup
- Enclosing class:
- NewConnectionPoolSpec
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
scala.Function1<HttpRequest,
scala.concurrent.Future<HttpResponse>> asyncTestServerHandler
(int connNr) <T> scala.Tuple4<org.apache.pekko.stream.testkit.TestPublisher.Probe<scala.Tuple2<HttpRequest,
T>>, org.apache.pekko.stream.testkit.TestSubscriber.ManualProbe<scala.Tuple2<scala.util.Try<HttpResponse>, T>>, org.reactivestreams.Subscription, Http.HostConnectionPool> cachedHostConnectionPool
(int maxConnections, int minConnections, int maxRetries, int maxOpenRequests, int pipeliningLimit, scala.concurrent.duration.FiniteDuration idleTimeout, scala.concurrent.duration.Duration maxConnectionLifetime, ClientConnectionSettings ccSettings) <T> T
condHolds
(scala.concurrent.duration.FiniteDuration in, scala.Function0<T> f) Makes sure the given condition "f" holds in the timer period of "in".int
<T,
Mat> scala.Tuple4<org.apache.pekko.stream.testkit.TestPublisher.Probe<scala.Tuple2<HttpRequest, T>>, org.apache.pekko.stream.testkit.TestSubscriber.ManualProbe<scala.Tuple2<scala.util.Try<HttpResponse>, T>>, org.reactivestreams.Subscription, Mat> flowTestBench
(org.apache.pekko.stream.scaladsl.Flow<scala.Tuple2<HttpRequest, T>, scala.Tuple2<scala.util.Try<HttpResponse>, T>, Mat> poolFlow) org.apache.pekko.stream.testkit.TestSubscriber.ManualProbe<Http.IncomingConnection>
org.reactivestreams.Subscription
org.apache.pekko.util.ByteString
mapServerSideOutboundRawBytes
(org.apache.pekko.util.ByteString bytes) scala.collection.immutable.Seq<HttpHeader>
responseHeaders
(HttpRequest r, int connNr) int
<T> scala.Tuple4<org.apache.pekko.stream.testkit.TestPublisher.Probe<scala.Tuple2<HttpRequest,
T>>, org.apache.pekko.stream.testkit.TestSubscriber.ManualProbe<scala.Tuple2<scala.util.Try<HttpResponse>, T>>, org.reactivestreams.Subscription, org.apache.pekko.NotUsed> superPool
(int maxConnections, int minConnections, int maxRetries, int maxOpenRequests, int pipeliningLimit, scala.concurrent.duration.FiniteDuration idleTimeout, ClientConnectionSettings ccSettings) scala.Function1<HttpRequest,
HttpResponse> testServerHandler
(int connNr)
-
Constructor Details
-
TestSetup
-
-
Method Details
-
asyncTestServerHandler
public scala.Function1<HttpRequest,scala.concurrent.Future<HttpResponse>> asyncTestServerHandler(int connNr) -
testServerHandler
-
responseHeaders
-
mapServerSideOutboundRawBytes
public org.apache.pekko.util.ByteString mapServerSideOutboundRawBytes(org.apache.pekko.util.ByteString bytes) -
incomingConnectionCounter
-
incomingConnections
public org.apache.pekko.stream.testkit.TestSubscriber.ManualProbe<Http.IncomingConnection> incomingConnections() -
incomingConnectionsSub
public org.reactivestreams.Subscription incomingConnectionsSub() -
serverHostName
-
serverPort
public int serverPort() -
acceptIncomingConnection
public void acceptIncomingConnection() -
cachedHostConnectionPool
public <T> scala.Tuple4<org.apache.pekko.stream.testkit.TestPublisher.Probe<scala.Tuple2<HttpRequest,T>>, cachedHostConnectionPoolorg.apache.pekko.stream.testkit.TestSubscriber.ManualProbe<scala.Tuple2<scala.util.Try<HttpResponse>, T>>, org.reactivestreams.Subscription, Http.HostConnectionPool> (int maxConnections, int minConnections, int maxRetries, int maxOpenRequests, int pipeliningLimit, scala.concurrent.duration.FiniteDuration idleTimeout, scala.concurrent.duration.Duration maxConnectionLifetime, ClientConnectionSettings ccSettings) -
superPool
public <T> scala.Tuple4<org.apache.pekko.stream.testkit.TestPublisher.Probe<scala.Tuple2<HttpRequest,T>>, superPoolorg.apache.pekko.stream.testkit.TestSubscriber.ManualProbe<scala.Tuple2<scala.util.Try<HttpResponse>, T>>, org.reactivestreams.Subscription, org.apache.pekko.NotUsed> (int maxConnections, int minConnections, int maxRetries, int maxOpenRequests, int pipeliningLimit, scala.concurrent.duration.FiniteDuration idleTimeout, ClientConnectionSettings ccSettings) -
flowTestBench
public <T,Mat> scala.Tuple4<org.apache.pekko.stream.testkit.TestPublisher.Probe<scala.Tuple2<HttpRequest,T>>, flowTestBenchorg.apache.pekko.stream.testkit.TestSubscriber.ManualProbe<scala.Tuple2<scala.util.Try<HttpResponse>, T>>, org.reactivestreams.Subscription, Mat> (org.apache.pekko.stream.scaladsl.Flow<scala.Tuple2<HttpRequest, T>, scala.Tuple2<scala.util.Try<HttpResponse>, T>, Mat> poolFlow) -
connNr
-
requestUri
-
condHolds
public <T> T condHolds(scala.concurrent.duration.FiniteDuration in, scala.Function0<T> f) Makes sure the given condition "f" holds in the timer period of "in". The given condition function should throw if not met. Note: Execution of "condHolds" will take at least "in" time, so for big "in" it might drain the ime budget for tests.- Parameters:
in
- (undocumented)f
- (undocumented)- Returns:
- (undocumented)
-