Class NewConnectionPoolSpec.TestSetup

java.lang.Object
org.apache.pekko.http.impl.engine.client.NewConnectionPoolSpec.TestSetup
Enclosing class:
NewConnectionPoolSpec

public class NewConnectionPoolSpec.TestSetup extends Object
  • Constructor Details

    • TestSetup

      public TestSetup(ServerSettings serverSettings, boolean autoAccept)
  • Method Details

    • asyncTestServerHandler

      public scala.Function1<HttpRequest,scala.concurrent.Future<HttpResponse>> asyncTestServerHandler(int connNr)
    • testServerHandler

      public scala.Function1<HttpRequest,HttpResponse> testServerHandler(int connNr)
    • responseHeaders

      public scala.collection.immutable.Seq<HttpHeader> responseHeaders(HttpRequest r, int connNr)
    • mapServerSideOutboundRawBytes

      public org.apache.pekko.util.ByteString mapServerSideOutboundRawBytes(org.apache.pekko.util.ByteString bytes)
    • incomingConnectionCounter

      public AtomicInteger incomingConnectionCounter()
    • incomingConnections

      public org.apache.pekko.stream.testkit.TestSubscriber.ManualProbe<Http.IncomingConnection> incomingConnections()
    • incomingConnectionsSub

      public org.reactivestreams.Subscription incomingConnectionsSub()
    • serverHostName

      public String 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>>,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)
    • superPool

      public <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)
    • flowTestBench

      public <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)
    • connNr

      public int connNr(HttpResponse r)
    • requestUri

      public String requestUri(HttpResponse r)
    • 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)