Skip to content

Commit

Permalink
remove akka.stream.testkit.AkkaSpec, fixes akka#19879
Browse files Browse the repository at this point in the history
  • Loading branch information
rkuhn committed Feb 25, 2016
1 parent 06b4d54 commit 45e97e8
Show file tree
Hide file tree
Showing 183 changed files with 265 additions and 346 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import scala.concurrent.Await
import akka.util.Timeout

object FSMActorSpec {
val timeout = Timeout(2 seconds)

class Latches(implicit system: ActorSystem) {
val unlockedLatch = TestLatch()
Expand Down Expand Up @@ -103,6 +102,8 @@ object FSMActorSpec {
class FSMActorSpec extends AkkaSpec(Map("akka.actor.debug.fsm" -> true)) with ImplicitSender {
import FSMActorSpec._

val timeout = Timeout(2 seconds)

"An FSM Actor" must {

"unlock the lock" in {
Expand Down
3 changes: 1 addition & 2 deletions akka-actor-tests/src/test/scala/akka/pattern/AskSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import scala.util.Failure

import language.postfixOps

class AskSpec extends AkkaSpec with ScalaFutures {
class AskSpec extends AkkaSpec {

"The “ask” pattern" must {
"send request to actor and wrap the answer in Future" in {
Expand Down Expand Up @@ -230,4 +230,3 @@ class AskSpec extends AkkaSpec with ScalaFutures {
}

}

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ object PromiseRefSpec {
case object SecondMessage
}

class PromiseRefSpec extends AkkaSpec with ImplicitSender with ScalaFutures {
class PromiseRefSpec extends AkkaSpec with ImplicitSender {
import PromiseRefSpec._
import akka.pattern._

Expand Down Expand Up @@ -71,4 +71,3 @@ class PromiseRefSpec extends AkkaSpec with ImplicitSender with ScalaFutures {
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ object ExplicitAskSpec {
case class Response(sentFrom: ActorRef)
}

class ExplicitAskSpec extends AkkaSpec with ScalaFutures {
class ExplicitAskSpec extends AkkaSpec {
import ExplicitAskSpec._

"The “ask” pattern with explicit sender" must {
Expand Down Expand Up @@ -47,4 +47,3 @@ class ExplicitAskSpec extends AkkaSpec with ScalaFutures {
}

}

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package akka.util

import org.scalatest.WordSpec
import org.scalatest.Matchers
import org.scalautils.ConversionCheckedTripleEquals
import org.scalactic.ConversionCheckedTripleEquals

object TypedMultiMapSpec {
trait AbstractKey { type Type }
Expand Down Expand Up @@ -69,4 +69,4 @@ class TypedMultiMapSpec extends WordSpec with Matchers with ConversionCheckedTri

}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ import akka.actor.{ ActorRef, PoisonPill }
import akka.contrib.circuitbreaker.CircuitBreakerProxy._
import akka.testkit.{ AkkaSpec, TestProbe }
import akka.util.Timeout
import org.scalatest.concurrent.ScalaFutures
import org.scalatest.time.{ Millis, Second, Span }
import org.scalatest.{ GivenWhenThen, Matchers }

import scala.concurrent.duration._
import scala.language.postfixOps

class CircuitBreakerProxySpec extends AkkaSpec() with GivenWhenThen with Matchers with ScalaFutures {
class CircuitBreakerProxySpec extends AkkaSpec() with GivenWhenThen {

val baseCircuitBreakerPropsBuilder =
CircuitBreakerPropsBuilder(
Expand Down Expand Up @@ -439,7 +438,6 @@ class CircuitBreakerProxySpec extends AkkaSpec() with GivenWhenThen with Matcher
}

"Ask Extension" should {
implicit val patienceConfig = PatienceConfig(timeout = Span(1, Second), interval = Span(100, Millis))
import Implicits.askWithCircuitBreaker

import scala.concurrent.ExecutionContext.Implicits.global
Expand Down Expand Up @@ -488,7 +486,6 @@ class CircuitBreakerProxySpec extends AkkaSpec() with GivenWhenThen with Matcher
}

"Future Extension" should {
implicit val patienceConfig = PatienceConfig(timeout = Span(1, Second), interval = Span(100, Millis))
import Implicits.futureExtensions
import akka.pattern.ask

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

package docs.http.scaladsl

import akka.stream.testkit.AkkaSpec
import akka.testkit.AkkaSpec

class MarshalSpec extends AkkaSpec {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import akka.http.scaladsl.model._

//#import-model

import akka.stream.testkit.AkkaSpec
import akka.testkit.AkkaSpec
import akka.util.ByteString
import akka.http.scaladsl.model.headers.BasicHttpCredentials

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package docs.http.scaladsl

import akka.stream.{ Materializer, ActorMaterializer }
import akka.stream.testkit.AkkaSpec
import akka.testkit.AkkaSpec

class UnmarshalSpec extends AkkaSpec {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import akka.actor.Props
import akka.stream.ActorMaterializer
import akka.stream.actor.ActorPublisher
import akka.stream.scaladsl.{ Flow, Sink, Source }
import akka.stream.testkit.AkkaSpec
import akka.testkit.AkkaSpec

object ActorPublisherDocSpec {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import akka.stream.actor.ActorSubscriberMessage
import akka.stream.actor.MaxInFlightRequestStrategy
import akka.stream.scaladsl.Sink
import akka.stream.scaladsl.Source
import akka.stream.testkit.AkkaSpec
import akka.testkit.AkkaSpec

object ActorSubscriberDocSpec {
//#worker-pool
Expand Down
4 changes: 2 additions & 2 deletions akka-docs/rst/scala/code/docs/stream/BidiFlowDocSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
package docs.stream

import akka.stream.testkit.AkkaSpec
import akka.testkit.AkkaSpec
import akka.stream.scaladsl._
import akka.stream._
import akka.util.ByteString
Expand Down Expand Up @@ -143,7 +143,7 @@ object BidiFlowDocSpec {
})
}

class BidiFlowDocSpec extends AkkaSpec with ConversionCheckedTripleEquals {
class BidiFlowDocSpec extends AkkaSpec {
import BidiFlowDocSpec._

implicit val materializer = ActorMaterializer()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import akka.NotUsed
import akka.stream._
import akka.stream.scaladsl.Tcp.OutgoingConnection
import akka.stream.scaladsl._
import akka.stream.testkit.AkkaSpec
import akka.testkit.AkkaSpec
import akka.util.ByteString

import scala.concurrent.{ Future, Promise }
Expand Down
2 changes: 1 addition & 1 deletion akka-docs/rst/scala/code/docs/stream/FlowDocSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import akka.NotUsed
import akka.actor.Cancellable
import akka.stream.{ ClosedShape, FlowShape }
import akka.stream.scaladsl._
import akka.stream.testkit.AkkaSpec
import akka.testkit.AkkaSpec

import scala.concurrent.{ Promise, Future }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import akka.stream.ActorMaterializer
import akka.stream.ActorMaterializerSettings
import akka.stream.Supervision
import akka.stream.scaladsl._
import akka.stream.testkit.AkkaSpec
import akka.testkit.AkkaSpec
import akka.stream.Attributes
import akka.stream.ActorAttributes
import scala.concurrent.duration._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package docs.stream
import akka.NotUsed
import akka.stream._
import akka.stream.scaladsl._
import akka.stream.testkit.AkkaSpec
import akka.testkit.AkkaSpec

import scala.collection.immutable
import scala.concurrent.{ Future, Await }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package docs.stream
import akka.NotUsed
import akka.stream.FlowShape
import akka.stream.scaladsl.{ GraphDSL, Merge, Balance, Source, Flow }
import akka.stream.testkit.AkkaSpec
import akka.testkit.AkkaSpec

class FlowParallelismDocSpec extends AkkaSpec {

Expand Down
2 changes: 1 addition & 1 deletion akka-docs/rst/scala/code/docs/stream/GraphCyclesSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package docs.stream

import akka.stream.{ ClosedShape, OverflowStrategy, ActorMaterializer }
import akka.stream.scaladsl._
import akka.stream.testkit.AkkaSpec
import akka.testkit.AkkaSpec

class GraphCyclesSpec extends AkkaSpec {

Expand Down
6 changes: 3 additions & 3 deletions akka-docs/rst/scala/code/docs/stream/GraphStageDocSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import akka.stream.scaladsl.{ Keep, Sink, Flow, Source }
import akka.stream.stage._
import akka.stream._

import akka.stream.testkit.{ TestPublisher, TestSubscriber, AkkaSpec }
import akka.testkit.TestLatch
import akka.stream.testkit.{ TestPublisher, TestSubscriber }
import akka.testkit.{ AkkaSpec, TestLatch }

import scala.collection.mutable
import scala.concurrent.{ Promise, Await, Future }
Expand Down Expand Up @@ -519,4 +519,4 @@ class GraphStageDocSpec extends AkkaSpec {
sub.cancel()
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package docs.stream
import akka.NotUsed

import scala.concurrent.duration._
import akka.stream.testkit.AkkaSpec
import akka.testkit.AkkaSpec
import akka.stream.scaladsl._
import akka.stream.ActorMaterializer
import scala.concurrent.Future
Expand Down
2 changes: 1 addition & 1 deletion akka-docs/rst/scala/code/docs/stream/MigrationsScala.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package docs.stream

import akka.stream.scaladsl._
import akka.stream.testkit.AkkaSpec
import akka.testkit.AkkaSpec

class MigrationsScala extends AkkaSpec {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import scala.math._
import scala.concurrent.Await
import scala.concurrent.duration._
import scala.collection.immutable
import akka.testkit.TestLatch
import akka.testkit.{ AkkaSpec, TestLatch }

class RateTransformationDocSpec extends AkkaSpec {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import akka.stream.ActorMaterializer
import akka.stream.scaladsl.{ Flow, Sink, Source }
import akka.stream.testkit._
import org.reactivestreams.Processor
import akka.testkit.AkkaSpec

class ReactiveStreamsDocSpec extends AkkaSpec {
import TwitterStreamQuickstartDocSpec._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package docs.stream
import akka.NotUsed
import akka.stream._
import akka.stream.scaladsl._
import akka.stream.testkit.AkkaSpec
import akka.testkit.AkkaSpec

class StreamBuffersRateSpec extends AkkaSpec {
implicit val materializer = ActorMaterializer()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package docs.stream
import akka.actor.ActorRef
import akka.stream._
import akka.stream.scaladsl._
import akka.stream.testkit.AkkaSpec
import akka.testkit.AkkaSpec

import scala.concurrent.{ Await, Future }
import scala.concurrent.duration._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import akka.stream.testkit.scaladsl._
import scala.util._
import scala.concurrent.duration._
import scala.concurrent._
import akka.testkit.TestProbe
import akka.testkit.{ AkkaSpec, TestProbe }
import akka.pattern

class StreamTestKitDocSpec extends AkkaSpec {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import scala.concurrent.Future

//#imports

import akka.stream.testkit.AkkaSpec
import akka.testkit.AkkaSpec

object TwitterStreamQuickstartDocSpec {
//#model
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import scala.concurrent.Future
import org.scalatest.concurrent.ScalaFutures
import scala.concurrent.duration._

class RecipeSeq extends RecipeSpec with ScalaFutures {
implicit val patience = PatienceConfig(3.seconds)
class RecipeSeq extends RecipeSpec {

"Draining to a strict sequence" must {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package docs.stream.cookbook

import akka.stream.ActorMaterializer
import akka.stream.testkit.AkkaSpec
import akka.testkit.AkkaSpec

trait RecipeSpec extends AkkaSpec {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import akka.stream.scaladsl.{ FileIO, Sink, Source }
import akka.stream.testkit.Utils._
import akka.stream.testkit._
import akka.util.ByteString
import akka.testkit.AkkaSpec

import scala.concurrent.Future

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import java.util.concurrent.atomic.AtomicReference
import akka.stream._
import akka.stream.scaladsl.Tcp._
import akka.stream.scaladsl._
import akka.stream.testkit.AkkaSpec
import akka.testkit.AkkaSpec
import akka.testkit.TestProbe
import akka.util.ByteString
import docs.utils.TestUtils
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 = []
Expand Down
Loading

0 comments on commit 45e97e8

Please sign in to comment.