Merge pull request #19881 from akka/wip-19879-AkkaSpec-RK
remove akka.stream.testkit.AkkaSpec, fixes #19879
This commit is contained in:
commit
cb1de24556
183 changed files with 265 additions and 346 deletions
|
|
@ -1,13 +1,13 @@
|
|||
package akka.http.impl.engine.client
|
||||
|
||||
import javax.net.ssl.SSLContext
|
||||
|
||||
import akka.http.scaladsl.{ ConnectionContext, Http }
|
||||
import akka.http.scaladsl.model.{ HttpResponse, HttpRequest }
|
||||
import akka.stream.ActorMaterializer
|
||||
import akka.stream.scaladsl.{ Flow, Sink, Source }
|
||||
import akka.stream.testkit.{ TestSubscriber, TestPublisher, AkkaSpec, TestUtils, Utils }
|
||||
import akka.stream.testkit.{ TestSubscriber, TestPublisher, TestUtils, Utils }
|
||||
import akka.http.scaladsl.model.headers
|
||||
import akka.testkit.AkkaSpec
|
||||
|
||||
class ClientCancellationSpec extends AkkaSpec("""
|
||||
akka.loglevel = DEBUG
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ import java.nio.ByteBuffer
|
|||
import java.nio.channels.{ SocketChannel, ServerSocketChannel }
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
import akka.http.impl.settings.ConnectionPoolSettingsImpl
|
||||
|
||||
import scala.concurrent.Await
|
||||
import scala.concurrent.duration._
|
||||
import scala.util.control.NonFatal
|
||||
|
|
@ -20,10 +19,11 @@ import akka.http.impl.util.{ SingletonException, StreamUtils }
|
|||
import akka.http.scaladsl.settings.{ ClientConnectionSettings, ConnectionPoolSettings, ServerSettings }
|
||||
import akka.stream.{ ActorMaterializer }
|
||||
import akka.stream.TLSProtocol._
|
||||
import akka.stream.testkit.{ TestPublisher, TestSubscriber, AkkaSpec }
|
||||
import akka.stream.testkit.{ TestPublisher, TestSubscriber }
|
||||
import akka.stream.scaladsl._
|
||||
import akka.http.scaladsl.model.headers._
|
||||
import akka.http.scaladsl.model._
|
||||
import akka.testkit.AkkaSpec
|
||||
|
||||
class ConnectionPoolSpec extends AkkaSpec("""
|
||||
akka.loggers = []
|
||||
|
|
|
|||
|
|
@ -10,15 +10,14 @@ import scala.concurrent.Await
|
|||
import scala.concurrent.duration._
|
||||
import akka.stream.{ ActorMaterializerSettings, FlowShape, ActorMaterializer }
|
||||
import akka.stream.scaladsl._
|
||||
import akka.stream.testkit.AkkaSpec
|
||||
import akka.testkit.AkkaSpec
|
||||
import akka.http.scaladsl.{ Http, TestUtils }
|
||||
import akka.http.scaladsl.model._
|
||||
import akka.stream.testkit.Utils
|
||||
import org.scalatest.concurrent.ScalaFutures
|
||||
|
||||
class HighLevelOutgoingConnectionSpec extends AkkaSpec with ScalaFutures {
|
||||
class HighLevelOutgoingConnectionSpec extends AkkaSpec {
|
||||
implicit val materializer = ActorMaterializer(ActorMaterializerSettings(system).withFuzzing(true))
|
||||
implicit val patience = PatienceConfig(1.second)
|
||||
|
||||
"The connection-level client implementation" should {
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ package akka.http.impl.engine.client
|
|||
|
||||
import akka.actor.ActorSystem
|
||||
import akka.http.scaladsl.settings.{ ClientConnectionSettings, ConnectionPoolSettings, ServerSettings }
|
||||
import akka.stream.testkit.AkkaSpec
|
||||
import akka.testkit.AkkaSpec
|
||||
import com.typesafe.config.ConfigFactory
|
||||
|
||||
class HttpConfigurationSpec extends AkkaSpec {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import org.scalatest.concurrent.ScalaFutures
|
|||
import akka.http.scaladsl.settings.ClientConnectionSettings
|
||||
import akka.util.ByteString
|
||||
import akka.event.NoLogging
|
||||
import akka.stream.{ClosedShape, ActorMaterializer}
|
||||
import akka.stream.{ ClosedShape, ActorMaterializer }
|
||||
import akka.stream.TLSProtocol._
|
||||
import akka.stream.testkit._
|
||||
import akka.stream.scaladsl._
|
||||
|
|
@ -20,6 +20,7 @@ import akka.http.scaladsl.model.HttpMethods._
|
|||
import akka.http.scaladsl.model._
|
||||
import akka.http.scaladsl.model.headers._
|
||||
import akka.http.impl.util._
|
||||
import akka.testkit.AkkaSpec
|
||||
|
||||
class LowLevelOutgoingConnectionSpec extends AkkaSpec("akka.loggers = []\n akka.loglevel = OFF") with Inside {
|
||||
implicit val materializer = ActorMaterializer()
|
||||
|
|
@ -179,7 +180,7 @@ class LowLevelOutgoingConnectionSpec extends AkkaSpec("akka.loggers = []\n akka.
|
|||
}
|
||||
}
|
||||
|
||||
"proceed to next response once previous response's entity has been drained" in new TestSetup with ScalaFutures {
|
||||
"proceed to next response once previous response's entity has been drained" in new TestSetup {
|
||||
def twice(action: => Unit): Unit = { action; action }
|
||||
|
||||
twice {
|
||||
|
|
@ -203,11 +204,10 @@ class LowLevelOutgoingConnectionSpec extends AkkaSpec("akka.loggers = []\n akka.
|
|||
|""")
|
||||
|
||||
val whenComplete = expectResponse().entity.dataBytes.runWith(Sink.ignore)
|
||||
whenComplete.futureValue should be (akka.Done)
|
||||
whenComplete.futureValue should be(akka.Done)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
"handle several requests on one persistent connection" which {
|
||||
"has a first response that was chunked" in new TestSetup {
|
||||
requestsSub.sendNext(HttpRequest())
|
||||
|
|
|
|||
|
|
@ -10,8 +10,9 @@ import akka.http.scaladsl.model._
|
|||
import akka.http.scaladsl.settings.ParserSettings
|
||||
import akka.stream.{ ActorMaterializer, Attributes }
|
||||
import akka.stream.scaladsl.{ Sink, Source }
|
||||
import akka.stream.testkit.{ TestSubscriber, TestPublisher, AkkaSpec }
|
||||
import akka.stream.testkit.{ TestSubscriber, TestPublisher }
|
||||
import akka.util.ByteString
|
||||
import akka.testkit.AkkaSpec
|
||||
|
||||
class PrepareResponseSpec extends AkkaSpec {
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import org.scalatest.concurrent.PatienceConfiguration.Timeout
|
|||
import org.scalatest.concurrent.ScalaFutures
|
||||
import akka.stream.{ Server, Client, ActorMaterializer }
|
||||
import akka.stream.scaladsl._
|
||||
import akka.stream.testkit.AkkaSpec
|
||||
import akka.testkit.AkkaSpec
|
||||
import akka.http.impl.util._
|
||||
import akka.http.scaladsl.{ ConnectionContext, Http }
|
||||
import akka.http.scaladsl.model.{ StatusCodes, HttpResponse, HttpRequest }
|
||||
|
|
@ -21,7 +21,7 @@ class TlsEndpointVerificationSpec extends AkkaSpec("""
|
|||
akka.loglevel = INFO
|
||||
akka.io.tcp.trace-logging = off
|
||||
akka.http.parsing.tls-session-info-header = on
|
||||
""") with ScalaFutures {
|
||||
""") {
|
||||
implicit val materializer = ActorMaterializer()
|
||||
|
||||
/*
|
||||
|
|
@ -30,7 +30,6 @@ class TlsEndpointVerificationSpec extends AkkaSpec("""
|
|||
val includeTestsHittingActualWebsites = false
|
||||
|
||||
val timeout = Timeout(Span(3, Seconds))
|
||||
implicit val patience = PatienceConfig(Span(10, Seconds))
|
||||
|
||||
"The client implementation" should {
|
||||
"not accept certificates signed by unknown CA" in {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ import headers._
|
|||
import HttpEntity._
|
||||
import MediaTypes._
|
||||
import HttpMethods._
|
||||
import akka.testkit.AkkaSpec
|
||||
|
||||
class HttpServerSpec extends AkkaSpec(
|
||||
"""akka.loggers = []
|
||||
|
|
@ -354,7 +355,7 @@ class HttpServerSpec extends AkkaSpec(
|
|||
}
|
||||
}
|
||||
|
||||
"proceed to next request once previous request's entity has beed drained" in new TestSetup with ScalaFutures {
|
||||
"proceed to next request once previous request's entity has beed drained" in new TestSetup {
|
||||
def twice(action: => Unit): Unit = { action; action }
|
||||
|
||||
twice {
|
||||
|
|
@ -369,7 +370,7 @@ class HttpServerSpec extends AkkaSpec(
|
|||
|""")
|
||||
|
||||
val whenComplete = expectRequest().entity.dataBytes.runWith(Sink.ignore)
|
||||
whenComplete.futureValue should be (akka.Done)
|
||||
whenComplete.futureValue should be(akka.Done)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,12 +21,11 @@ import java.net.InetSocketAddress
|
|||
import akka.stream.impl.fusing.GraphStages
|
||||
import akka.util.ByteString
|
||||
import akka.stream.testkit.scaladsl.TestSink
|
||||
import akka.testkit.EventFilter
|
||||
import akka.testkit.{ AkkaSpec, EventFilter }
|
||||
|
||||
class WebSocketIntegrationSpec extends AkkaSpec("akka.stream.materializer.debug.fuzzing-mode=off")
|
||||
with ScalaFutures with ConversionCheckedTripleEquals with Eventually {
|
||||
with Eventually {
|
||||
|
||||
implicit val patience = PatienceConfig(3.seconds)
|
||||
implicit val materializer = ActorMaterializer()
|
||||
|
||||
"A WebSocket server" must {
|
||||
|
|
|
|||
|
|
@ -4,18 +4,17 @@
|
|||
package akka.http.impl.util
|
||||
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
|
||||
import akka.NotUsed
|
||||
import akka.stream.ActorMaterializer
|
||||
import akka.stream.scaladsl.{ Flow, Keep, Sink, Source }
|
||||
import akka.stream.testkit.Utils._
|
||||
import akka.stream.testkit.{ AkkaSpec, _ }
|
||||
import akka.stream.testkit._
|
||||
import org.scalactic.ConversionCheckedTripleEquals
|
||||
|
||||
import scala.concurrent.Await
|
||||
import scala.concurrent.duration._
|
||||
import akka.testkit.AkkaSpec
|
||||
|
||||
class One2OneBidiFlowSpec extends AkkaSpec with ConversionCheckedTripleEquals {
|
||||
class One2OneBidiFlowSpec extends AkkaSpec {
|
||||
implicit val materializer = ActorMaterializer()
|
||||
|
||||
"A One2OneBidiFlow" must {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import akka.http.javadsl.model._
|
|||
import org.scalatest.concurrent.ScalaFutures
|
||||
import org.scalatest.{ BeforeAndAfterAll, Matchers, WordSpec }
|
||||
|
||||
class ConnectHttpSpec extends WordSpec with Matchers with BeforeAndAfterAll with ScalaFutures {
|
||||
class ConnectHttpSpec extends WordSpec with Matchers with BeforeAndAfterAll {
|
||||
|
||||
val httpContext = ConnectionContext.noEncryption()
|
||||
val httpsContext = ConnectionContext.https(null)
|
||||
|
|
@ -72,4 +72,4 @@ class ConnectHttpSpec extends WordSpec with Matchers with BeforeAndAfterAll with
|
|||
ex.getMessage should include("non https scheme!")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ import org.scalatest.{ WordSpec, Matchers, BeforeAndAfterAll }
|
|||
import org.scalatest.concurrent.ScalaFutures
|
||||
import scala.util.Try
|
||||
|
||||
class HttpExtensionApiSpec extends WordSpec with Matchers with BeforeAndAfterAll with ScalaFutures {
|
||||
class HttpExtensionApiSpec extends WordSpec with Matchers with BeforeAndAfterAll {
|
||||
|
||||
// tries to cover all surface area of javadsl.Http
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue