Remove some of Unused import warning (#24750)

* Remove `Unused import` of `akka-actor-typed`

* Remove `Unused import` of `akka-actor-typed-tests`

* Remove `Unused import` of `akka-stream-tests`

* Remove `Unused import` of `akka-persistence`

* Remove `Unused import` of `akka-persistence-typed`

* Remove `Unused import` of `akka-cluster-typed`

* Remove `Unused import` of `akka-cluster-sharding-typed`

* Format source code
This commit is contained in:
Jimin Hsieh 2018-03-20 11:01:15 +08:00 committed by Konrad `ktoso` Malawski
parent b3fbf6869b
commit 3685ce619e
81 changed files with 42 additions and 156 deletions

View file

@ -13,7 +13,6 @@ import scala.util.control.NoStackTrace
import akka.actor.typed.scaladsl.Behaviors import akka.actor.typed.scaladsl.Behaviors
import akka.actor.typed.scaladsl.TimerScheduler import akka.actor.typed.scaladsl.TimerScheduler
import akka.testkit.TimingTest import akka.testkit.TimingTest
import akka.testkit.typed.TestKitSettings
import akka.testkit.typed.scaladsl.{ ActorTestKit, _ } import akka.testkit.typed.scaladsl.{ ActorTestKit, _ }
import org.scalatest.WordSpecLike import org.scalatest.WordSpecLike

View file

@ -4,7 +4,7 @@
package akka.actor.typed.scaladsl package akka.actor.typed.scaladsl
import akka.actor.typed.{ LogMarker, TestException, TypedAkkaSpec, scaladsl } import akka.actor.typed.{ LogMarker, TestException, TypedAkkaSpec }
import akka.testkit.EventFilter import akka.testkit.EventFilter
import com.typesafe.config.ConfigFactory import com.typesafe.config.ConfigFactory
import akka.actor.typed.scaladsl.adapter._ import akka.actor.typed.scaladsl.adapter._
@ -12,8 +12,6 @@ import akka.event.Logging
import akka.event.Logging.{ LogEventWithCause, LogEventWithMarker } import akka.event.Logging.{ LogEventWithCause, LogEventWithMarker }
import akka.testkit.typed.scaladsl.ActorTestKit import akka.testkit.typed.scaladsl.ActorTestKit
import scala.util.control.NoStackTrace
class ActorLoggingSpec extends ActorTestKit with TypedAkkaSpec { class ActorLoggingSpec extends ActorTestKit with TypedAkkaSpec {
override def config = ConfigFactory.parseString( override def config = ConfigFactory.parseString(

View file

@ -4,11 +4,6 @@
package akka.actor.typed.scaladsl package akka.actor.typed.scaladsl
import scala.concurrent.TimeoutException
import scala.concurrent.duration._
import scala.reflect.ClassTag
import scala.util.Failure
import scala.util.Success
import akka.actor.typed.scaladsl.adapter._ import akka.actor.typed.scaladsl.adapter._
import akka.actor.typed.ActorRef import akka.actor.typed.ActorRef
import akka.actor.typed.PostStop import akka.actor.typed.PostStop

View file

@ -7,14 +7,12 @@ package akka.actor.typed.scaladsl.adapter
import scala.concurrent.duration._ import scala.concurrent.duration._
import scala.util.control.NoStackTrace import scala.util.control.NoStackTrace
import akka.actor.typed.{ ActorRef, ActorSystem, Behavior, Terminated } import akka.actor.typed.{ ActorRef, ActorSystem, Behavior, Terminated }
import akka.actor.{ InvalidMessageException, Props } import akka.actor.InvalidMessageException
import akka.actor.typed.scaladsl.Behaviors import akka.actor.typed.scaladsl.Behaviors
import akka.{ Done, NotUsed, actor untyped } import akka.{ Done, NotUsed, actor untyped }
import akka.testkit._ import akka.testkit._
import akka.actor.typed.Behavior.UntypedPropsBehavior import akka.actor.typed.Behavior.UntypedPropsBehavior
import scala.concurrent.Await
object AdapterSpec { object AdapterSpec {
val untyped1: untyped.Props = untyped.Props(new Untyped1) val untyped1: untyped.Props = untyped.Props(new Untyped1)

View file

@ -8,7 +8,7 @@ import java.net.URI
import akka.NotUsed import akka.NotUsed
import akka.actor.typed.{ ActorRef, ActorSystem, Behavior, TypedAkkaSpecWithShutdown } import akka.actor.typed.{ ActorRef, ActorSystem, Behavior, TypedAkkaSpecWithShutdown }
import akka.actor.typed.scaladsl.{ ActorContext, Behaviors, TimerScheduler } import akka.actor.typed.scaladsl.{ Behaviors, TimerScheduler }
import akka.testkit.typed.scaladsl.{ ActorTestKit, TestProbe } import akka.testkit.typed.scaladsl.{ ActorTestKit, TestProbe }
import akka.util.Timeout import akka.util.Timeout

View file

@ -8,7 +8,6 @@ import akka.annotation.InternalApi
import akka.{ actor a } import akka.{ actor a }
import scala.annotation.unchecked.uncheckedVariance import scala.annotation.unchecked.uncheckedVariance
import language.implicitConversions
import scala.concurrent.Future import scala.concurrent.Future
import scala.util.Success import scala.util.Success

View file

@ -8,12 +8,10 @@ import akka.actor.InvalidMessageException
import akka.actor.typed.internal.BehaviorImpl import akka.actor.typed.internal.BehaviorImpl
import scala.annotation.tailrec import scala.annotation.tailrec
import akka.util.{ ConstantFun, LineNumbers, OptionVal } import akka.util.{ LineNumbers, OptionVal }
import akka.annotation.{ DoNotInherit, InternalApi } import akka.annotation.{ DoNotInherit, InternalApi }
import akka.actor.typed.scaladsl.{ ActorContext SAC } import akka.actor.typed.scaladsl.{ ActorContext SAC }
import scala.reflect.ClassTag
/** /**
* The behavior of an actor defines how it reacts to the messages that it * The behavior of an actor defines how it reacts to the messages that it
* receives. The message may either be of the type that the Actor declares * receives. The message may either be of the type that the Actor declares

View file

@ -11,7 +11,6 @@ import akka.actor.DeadLetterSuppression
import akka.actor.typed.SupervisorStrategy._ import akka.actor.typed.SupervisorStrategy._
import akka.actor.typed.scaladsl.Behaviors import akka.actor.typed.scaladsl.Behaviors
import akka.annotation.InternalApi import akka.annotation.InternalApi
import akka.event.Logging
import akka.util.OptionVal import akka.util.OptionVal
import scala.concurrent.duration.{ Deadline, FiniteDuration } import scala.concurrent.duration.{ Deadline, FiniteDuration }

View file

@ -8,11 +8,8 @@ package internal
import scala.concurrent.duration.FiniteDuration import scala.concurrent.duration.FiniteDuration
import akka.actor.Cancellable import akka.actor.Cancellable
import akka.annotation.ApiMayChange
import akka.annotation.DoNotInherit
import akka.annotation.InternalApi import akka.annotation.InternalApi
import akka.dispatch.ExecutionContexts import akka.dispatch.ExecutionContexts
import akka.actor.typed.ActorRef
import akka.actor.typed.ActorRef.ActorRefOps import akka.actor.typed.ActorRef.ActorRefOps
import akka.actor.typed.javadsl import akka.actor.typed.javadsl
import akka.actor.typed.scaladsl import akka.actor.typed.scaladsl

View file

@ -18,7 +18,6 @@ import scala.util.control.NonFatal
*/ */
@InternalApi private[typed] class ActorAdapter[T](_initialBehavior: Behavior[T]) extends a.Actor with a.ActorLogging { @InternalApi private[typed] class ActorAdapter[T](_initialBehavior: Behavior[T]) extends a.Actor with a.ActorLogging {
import Behavior._ import Behavior._
import ActorRefAdapter.toUntyped
protected var behavior: Behavior[T] = _initialBehavior protected var behavior: Behavior[T] = _initialBehavior

View file

@ -82,7 +82,6 @@ import scala.concurrent.duration._
actorLogger match { actorLogger match {
case OptionVal.Some(logger) logger case OptionVal.Some(logger) logger
case OptionVal.None case OptionVal.None
import scala.language.existentials
val logSource = self.path.toString val logSource = self.path.toString
val logClass = classOf[Behavior[_]] // FIXME figure out a better class somehow val logClass = classOf[Behavior[_]] // FIXME figure out a better class somehow
val system = untyped.system.asInstanceOf[ExtendedActorSystem] val system = untyped.system.asInstanceOf[ExtendedActorSystem]

View file

@ -8,7 +8,6 @@ import akka.actor.typed.Behavior
import akka.actor.typed.Props import akka.actor.typed.Props
import akka.actor.typed.EmptyProps import akka.actor.typed.EmptyProps
import akka.actor.typed.ActorRef import akka.actor.typed.ActorRef
import akka.actor.typed.internal.adapter.ActorRefAdapter
import akka.actor.typed.scaladsl.adapter._ import akka.actor.typed.scaladsl.adapter._
import akka.actor.typed.ActorSystem import akka.actor.typed.ActorSystem
import akka.actor.typed.internal.adapter.ActorContextAdapter import akka.actor.typed.internal.adapter.ActorContextAdapter

View file

@ -140,8 +140,6 @@ class BehaviorBuilder[T] private (
object BehaviorBuilder { object BehaviorBuilder {
def create[T]: BehaviorBuilder[T] = new BehaviorBuilder[T](Nil, Nil) def create[T]: BehaviorBuilder[T] = new BehaviorBuilder[T](Nil, Nil)
import scala.language.existentials
/** INTERNAL API */ /** INTERNAL API */
@InternalApi @InternalApi
private[javadsl] final case class Case[BT, MT](`type`: Class[_ <: MT], test: Option[MT Boolean], handler: (ActorContext[BT], MT) Behavior[BT]) private[javadsl] final case class Case[BT, MT](`type`: Class[_ <: MT], test: Option[MT Boolean], handler: (ActorContext[BT], MT) Behavior[BT])

View file

@ -137,8 +137,6 @@ class ReceiveBuilder[T] private (
object ReceiveBuilder { object ReceiveBuilder {
def create[T]: ReceiveBuilder[T] = new ReceiveBuilder[T](Nil, Nil) def create[T]: ReceiveBuilder[T] = new ReceiveBuilder[T](Nil, Nil)
import scala.language.existentials
/** INTERNAL API */ /** INTERNAL API */
@InternalApi @InternalApi
private[javadsl] final case class Case[BT, MT](`type`: Class[_ <: MT], test: Option[MT Boolean], handler: MT Behavior[BT]) private[javadsl] final case class Case[BT, MT](`type`: Class[_ <: MT], test: Option[MT Boolean], handler: MT Behavior[BT])

View file

@ -6,7 +6,6 @@ package akka.actor.typed.scaladsl
import akka.actor.typed._ import akka.actor.typed._
import akka.annotation.{ ApiMayChange, DoNotInherit } import akka.annotation.{ ApiMayChange, DoNotInherit }
import akka.event.LoggingAdapter
import akka.util.Timeout import akka.util.Timeout
import scala.concurrent.ExecutionContextExecutor import scala.concurrent.ExecutionContextExecutor

View file

@ -5,6 +5,7 @@
package akka.actor.typed package akka.actor.typed
package scaladsl package scaladsl
import akka.annotation.ApiMayChange
import akka.actor.typed.internal.{ BehaviorImpl, LoggingBehaviorImpl, Supervisor, TimerSchedulerImpl } import akka.actor.typed.internal.{ BehaviorImpl, LoggingBehaviorImpl, Supervisor, TimerSchedulerImpl }
import akka.annotation.{ ApiMayChange, DoNotInherit, InternalApi } import akka.annotation.{ ApiMayChange, DoNotInherit, InternalApi }

View file

@ -4,8 +4,6 @@
package akka.actor.typed.scaladsl package akka.actor.typed.scaladsl
import java.util.function.{ Function JFunction }
import akka.actor.typed.Behavior import akka.actor.typed.Behavior
import akka.actor.typed.internal.StashBufferImpl import akka.actor.typed.internal.StashBufferImpl
import akka.annotation.DoNotInherit import akka.annotation.DoNotInherit

View file

@ -5,9 +5,7 @@
package akka.actor.typed.scaladsl.adapter package akka.actor.typed.scaladsl.adapter
import akka.actor.typed.Behavior import akka.actor.typed.Behavior
import akka.actor.typed.EmptyProps
import akka.actor.typed.Props import akka.actor.typed.Props
import akka.actor.typed.internal.adapter.ActorAdapter
/** /**
* Wrap [[akka.actor.typed.Behavior]] in an untyped [[akka.actor.Props]], i.e. when * Wrap [[akka.actor.typed.Behavior]] in an untyped [[akka.actor.Props]], i.e. when

View file

@ -15,7 +15,6 @@ import akka.actor.typed.Behavior
import akka.actor.typed.Props import akka.actor.typed.Props
import akka.annotation.DoNotInherit import akka.annotation.DoNotInherit
import akka.annotation.InternalApi import akka.annotation.InternalApi
import akka.cluster.sharding.ShardCoordinator.LeastShardAllocationStrategy
import akka.cluster.sharding.ShardCoordinator.ShardAllocationStrategy import akka.cluster.sharding.ShardCoordinator.ShardAllocationStrategy
import akka.cluster.sharding.typed.internal.EntityTypeKeyImpl import akka.cluster.sharding.typed.internal.EntityTypeKeyImpl
import akka.japi.function.{ Function JFunction } import akka.japi.function.{ Function JFunction }

View file

@ -20,7 +20,6 @@ import akka.actor.typed.ExtensionId
import akka.actor.typed.Props import akka.actor.typed.Props
import akka.annotation.DoNotInherit import akka.annotation.DoNotInherit
import akka.annotation.InternalApi import akka.annotation.InternalApi
import akka.cluster.sharding.ShardCoordinator.LeastShardAllocationStrategy
import akka.cluster.sharding.ShardCoordinator.ShardAllocationStrategy import akka.cluster.sharding.ShardCoordinator.ShardAllocationStrategy
import akka.cluster.sharding.typed.internal.ClusterShardingImpl import akka.cluster.sharding.typed.internal.ClusterShardingImpl
import akka.cluster.sharding.typed.internal.EntityTypeKeyImpl import akka.cluster.sharding.typed.internal.EntityTypeKeyImpl

View file

@ -42,8 +42,6 @@ object ClusterShardingPersistenceSpec {
final case class Get(replyTo: ActorRef[String]) extends Command final case class Get(replyTo: ActorRef[String]) extends Command
final case object StopPlz extends Command final case object StopPlz extends Command
import PersistentBehaviors._
def persistentActor(entityId: String): Behavior[Command] = def persistentActor(entityId: String): Behavior[Command] =
PersistentBehaviors.receive[Command, String, String]( PersistentBehaviors.receive[Command, String, String](
entityId, entityId,

View file

@ -7,7 +7,6 @@ package akka.cluster.ddata.typed.internal
import scala.compat.java8.OptionConverters._ import scala.compat.java8.OptionConverters._
import scala.concurrent.duration._ import scala.concurrent.duration._
import scala.concurrent.duration.Duration import scala.concurrent.duration.Duration
import scala.concurrent.Future
import akka.annotation.InternalApi import akka.annotation.InternalApi
import akka.cluster.{ ddata dd } import akka.cluster.{ ddata dd }
@ -18,7 +17,6 @@ import akka.actor.typed.scaladsl.Behaviors
import akka.actor.typed.scaladsl.adapter._ import akka.actor.typed.scaladsl.adapter._
import akka.util.Timeout import akka.util.Timeout
import akka.cluster.ddata.ReplicatedData import akka.cluster.ddata.ReplicatedData
import akka.cluster.ddata.Key
import akka.actor.typed.Terminated import akka.actor.typed.Terminated
/** /**

View file

@ -6,13 +6,11 @@ package akka.cluster.ddata.typed.javadsl
import java.util.function.{ Function JFunction } import java.util.function.{ Function JFunction }
import akka.cluster.{ ddata dd } import akka.cluster.{ ddata dd }
import akka.cluster.ddata.typed.scaladsl
import akka.cluster.ddata.Key import akka.cluster.ddata.Key
import akka.cluster.ddata.ReplicatedData import akka.cluster.ddata.ReplicatedData
import akka.actor.typed.ActorRef import akka.actor.typed.ActorRef
import akka.actor.typed.Behavior import akka.actor.typed.Behavior
import akka.cluster.ddata.typed.internal.ReplicatorBehavior import akka.cluster.ddata.typed.internal.ReplicatorBehavior
import akka.cluster.ddata.typed.scaladsl
import scala.concurrent.duration.FiniteDuration import scala.concurrent.duration.FiniteDuration
import scala.concurrent.duration.Duration import scala.concurrent.duration.Duration
@ -23,7 +21,6 @@ import akka.actor.{ DeadLetterSuppression, NoSerializationVerificationNeeded }
import akka.actor.typed.{ ActorRef, Behavior } import akka.actor.typed.{ ActorRef, Behavior }
import akka.annotation.{ DoNotInherit, InternalApi } import akka.annotation.{ DoNotInherit, InternalApi }
import akka.cluster.ddata.typed.internal.ReplicatorBehavior import akka.cluster.ddata.typed.internal.ReplicatorBehavior
import akka.cluster.ddata.typed.scaladsl
import akka.cluster.{ ddata dd } import akka.cluster.{ ddata dd }
import scala.concurrent.duration.{ Duration, FiniteDuration } import scala.concurrent.duration.{ Duration, FiniteDuration }

View file

@ -13,7 +13,6 @@ import akka.cluster.singleton.{ ClusterSingletonProxy, ClusterSingletonManager
import akka.actor.typed.Behavior.UntypedPropsBehavior import akka.actor.typed.Behavior.UntypedPropsBehavior
import akka.cluster.typed.{ Cluster, ClusterSingleton, ClusterSingletonImpl, ClusterSingletonSettings } import akka.cluster.typed.{ Cluster, ClusterSingleton, ClusterSingletonImpl, ClusterSingletonSettings }
import akka.actor.typed.internal.adapter.ActorSystemAdapter import akka.actor.typed.internal.adapter.ActorSystemAdapter
import akka.actor.typed.scaladsl.adapter._
import akka.actor.typed.{ ActorRef, ActorSystem, Behavior, Props } import akka.actor.typed.{ ActorRef, ActorSystem, Behavior, Props }
/** /**

View file

@ -16,7 +16,7 @@ import akka.cluster.ddata.{ DistributedData, ORMultiMap, ORMultiMapKey, Replicat
import akka.cluster.{ Cluster, ClusterEvent } import akka.cluster.{ Cluster, ClusterEvent }
import akka.util.TypedMultiMap import akka.util.TypedMultiMap
import scala.language.{ existentials, higherKinds } import scala.language.existentials
import akka.actor.typed.scaladsl.adapter._ import akka.actor.typed.scaladsl.adapter._
/** INTERNAL API */ /** INTERNAL API */

View file

@ -16,7 +16,6 @@ import akka.testkit.typed.scaladsl.{ ActorTestKit, TestProbe }
import akka.actor.typed.scaladsl.adapter._ import akka.actor.typed.scaladsl.adapter._
import akka.util.Timeout import akka.util.Timeout
import com.typesafe.config.ConfigFactory import com.typesafe.config.ConfigFactory
import org.scalatest.{ Matchers, WordSpecLike }
import scala.concurrent.duration._ import scala.concurrent.duration._
import scala.util.{ Failure, Success } import scala.util.{ Failure, Success }

View file

@ -8,7 +8,6 @@ import java.nio.charset.StandardCharsets
import akka.actor.ExtendedActorSystem import akka.actor.ExtendedActorSystem
import akka.actor.typed.{ ActorRef, ActorRefResolver, TypedAkkaSpecWithShutdown } import akka.actor.typed.{ ActorRef, ActorRefResolver, TypedAkkaSpecWithShutdown }
import akka.actor.typed.internal.adapter.ActorSystemAdapter
import akka.actor.typed.receptionist.{ Receptionist, ServiceKey } import akka.actor.typed.receptionist.{ Receptionist, ServiceKey }
import akka.actor.typed.scaladsl.Behaviors import akka.actor.typed.scaladsl.Behaviors
import akka.actor.typed.scaladsl.adapter._ import akka.actor.typed.scaladsl.adapter._
@ -17,7 +16,6 @@ import akka.serialization.SerializerWithStringManifest
import akka.testkit.typed.TestKitSettings import akka.testkit.typed.TestKitSettings
import akka.testkit.typed.scaladsl.{ ActorTestKit, TestProbe } import akka.testkit.typed.scaladsl.{ ActorTestKit, TestProbe }
import com.typesafe.config.ConfigFactory import com.typesafe.config.ConfigFactory
import scala.concurrent.Await
import scala.concurrent.duration._ import scala.concurrent.duration._
import akka.cluster.typed.Join import akka.cluster.typed.Join

View file

@ -4,8 +4,8 @@
package akka.persistence.typed.internal package akka.persistence.typed.internal
import akka.actor.typed.{ Behavior, PostStop, Signal } import akka.actor.typed.Behavior
import akka.actor.typed.scaladsl.{ ActorContext, Behaviors, TimerScheduler } import akka.actor.typed.scaladsl.{ Behaviors, TimerScheduler }
import akka.annotation.InternalApi import akka.annotation.InternalApi
import akka.event.Logging import akka.event.Logging
import akka.persistence.JournalProtocol._ import akka.persistence.JournalProtocol._

View file

@ -5,8 +5,8 @@
package akka.persistence.typed.internal package akka.persistence.typed.internal
import akka.actor.typed.scaladsl.Behaviors.same import akka.actor.typed.scaladsl.Behaviors.same
import akka.actor.typed.scaladsl.{ ActorContext, Behaviors, TimerScheduler } import akka.actor.typed.scaladsl.{ Behaviors, TimerScheduler }
import akka.actor.typed.{ Behavior, PostStop, Signal } import akka.actor.typed.Behavior
import akka.annotation.InternalApi import akka.annotation.InternalApi
import akka.persistence.SnapshotProtocol.{ LoadSnapshotFailed, LoadSnapshotResult } import akka.persistence.SnapshotProtocol.{ LoadSnapshotFailed, LoadSnapshotResult }
import akka.persistence._ import akka.persistence._

View file

@ -4,10 +4,9 @@
package akka.persistence.typed.internal package akka.persistence.typed.internal
import akka.actor.typed.{ Behavior, PostStop, PreRestart } import akka.actor.typed.Behavior
import akka.actor.typed.scaladsl.Behaviors import akka.actor.typed.scaladsl.Behaviors
import akka.annotation.InternalApi import akka.annotation.InternalApi
import akka.persistence._
import akka.persistence.typed.internal.EventsourcedBehavior.InternalProtocol import akka.persistence.typed.internal.EventsourcedBehavior.InternalProtocol
/** /**

View file

@ -4,8 +4,7 @@
package akka.persistence.typed.internal package akka.persistence.typed.internal
import akka.actor.typed.{ Behavior, Signal } import akka.actor.typed.Behavior
import akka.actor.typed.Behavior.StoppedBehavior
import akka.actor.typed.scaladsl.Behaviors import akka.actor.typed.scaladsl.Behaviors
import akka.actor.typed.scaladsl.MutableBehavior import akka.actor.typed.scaladsl.MutableBehavior
import akka.annotation.InternalApi import akka.annotation.InternalApi

View file

@ -6,11 +6,10 @@ package akka.persistence.typed.internal
import akka.actor.typed.Behavior import akka.actor.typed.Behavior
import akka.actor.typed.scaladsl.{ ActorContext, StashBuffer } import akka.actor.typed.scaladsl.{ ActorContext, StashBuffer }
import akka.actor.{ DeadLetter, ExtendedActorSystem, StashOverflowException } import akka.actor.{ DeadLetter, StashOverflowException }
import akka.annotation.InternalApi import akka.annotation.InternalApi
import akka.persistence.typed.internal.EventsourcedBehavior.InternalProtocol import akka.persistence.typed.internal.EventsourcedBehavior.InternalProtocol
import akka.persistence.{ StashOverflowStrategy, _ } import akka.persistence._
import akka.util.Collections.EmptyImmutableSeq
import akka.util.ConstantFun import akka.util.ConstantFun
import akka.{ actor a } import akka.{ actor a }

View file

@ -4,7 +4,6 @@
package akka.persistence.typed.scaladsl package akka.persistence.typed.scaladsl
import akka.actor.typed.scaladsl.Behaviors
import akka.annotation.DoNotInherit import akka.annotation.DoNotInherit
import akka.persistence.typed.internal._ import akka.persistence.typed.internal._

View file

@ -6,7 +6,7 @@ package akka.persistence.typed.scaladsl
import scala.concurrent.ExecutionContext import scala.concurrent.ExecutionContext
import scala.concurrent.duration._ import scala.concurrent.duration._
import akka.actor.typed.{ ActorRef, ActorSystem, Behavior, Terminated } import akka.actor.typed.{ ActorRef, Behavior }
import akka.actor.typed.scaladsl.Behaviors import akka.actor.typed.scaladsl.Behaviors
import akka.actor.typed.scaladsl.ActorContext import akka.actor.typed.scaladsl.ActorContext
import akka.actor.typed.scaladsl.TimerScheduler import akka.actor.typed.scaladsl.TimerScheduler

View file

@ -9,7 +9,6 @@ import java.lang.{ Iterable ⇒ JIterable }
import akka.actor._ import akka.actor._
import akka.japi.Procedure import akka.japi.Procedure
import akka.japi.Util import akka.japi.Util
import akka.persistence.Eventsourced.{ AsyncHandlerInvocation, StashingHandlerInvocation }
import com.typesafe.config.Config import com.typesafe.config.Config
import scala.collection.immutable import scala.collection.immutable
import scala.util.control.NoStackTrace import scala.util.control.NoStackTrace

View file

@ -15,7 +15,6 @@ import scala.concurrent.Future
import scala.util.{ Failure, Success, Try } import scala.util.{ Failure, Success, Try }
import scala.util.control.NonFatal import scala.util.control.NonFatal
import akka.pattern.CircuitBreaker import akka.pattern.CircuitBreaker
import java.util.Locale
/** /**
* Abstract journal, optimized for asynchronous, non-blocking writes. * Abstract journal, optimized for asynchronous, non-blocking writes.

View file

@ -15,7 +15,6 @@ import scala.collection.immutable.VectorBuilder
import scala.concurrent.duration import scala.concurrent.duration
import akka.actor.Actor import akka.actor.Actor
import scala.concurrent.duration.Duration import scala.concurrent.duration.Duration
import scala.language.existentials
import java.io.NotSerializableException import java.io.NotSerializableException
/** /**

View file

@ -8,8 +8,6 @@ import scala.concurrent.duration._
import scala.util.control.NoStackTrace import scala.util.control.NoStackTrace
import akka.actor._ import akka.actor._
import akka.event.Logging
import akka.event.Logging.Warning
import akka.testkit.{ EventFilter, ImplicitSender, TestEvent } import akka.testkit.{ EventFilter, ImplicitSender, TestEvent }
import com.typesafe.config.ConfigFactory import com.typesafe.config.ConfigFactory
import akka.testkit.TestProbe import akka.testkit.TestProbe

View file

@ -7,17 +7,11 @@ package akka.persistence
import scala.concurrent.duration._ import scala.concurrent.duration._
import scala.runtime.BoxedUnit import scala.runtime.BoxedUnit
import scala.runtime.BoxedUnit import scala.runtime.BoxedUnit
import scala.util.control.NoStackTrace
import akka.actor
import akka.actor._ import akka.actor._
import akka.event.Logging
import akka.event.Logging.Warning
import akka.japi.Procedure import akka.japi.Procedure
import akka.testkit.{ EventFilter, ImplicitSender, TestEvent } import akka.testkit.{ EventFilter, ImplicitSender }
import com.typesafe.config.ConfigFactory import com.typesafe.config.ConfigFactory
import akka.testkit.TestProbe
import akka.testkit.TestActors
import akka.testkit.TestEvent.Mute import akka.testkit.TestEvent.Mute
object TimerPersistentActorSpec { object TimerPersistentActorSpec {

View file

@ -9,7 +9,6 @@ import java.io.File
import akka.actor.{ ActorSystem, _ } import akka.actor.{ ActorSystem, _ }
import akka.persistence._ import akka.persistence._
import akka.persistence.fsm.PersistentFSM._ import akka.persistence.fsm.PersistentFSM._
import akka.persistence.fsm.PersistentFSMSpec.IntAdded
import akka.testkit._ import akka.testkit._
import com.typesafe.config.{ Config, ConfigFactory } import com.typesafe.config.{ Config, ConfigFactory }
import org.apache.commons.io.FileUtils import org.apache.commons.io.FileUtils

View file

@ -8,11 +8,11 @@ import akka.Done
import akka.actor.{ Actor, ActorSystem, PoisonPill, Props } import akka.actor.{ Actor, ActorSystem, PoisonPill, Props }
import akka.stream.ActorMaterializerSpec.ActorWithMaterializer import akka.stream.ActorMaterializerSpec.ActorWithMaterializer
import akka.stream.impl.{ PhasedFusingActorMaterializer, StreamSupervisor } import akka.stream.impl.{ PhasedFusingActorMaterializer, StreamSupervisor }
import akka.stream.scaladsl.{ Flow, Sink, Source } import akka.stream.scaladsl.{ Sink, Source }
import akka.stream.testkit.{ StreamSpec, TestPublisher } import akka.stream.testkit.{ StreamSpec, TestPublisher }
import akka.testkit.{ ImplicitSender, TestActor, TestLatch, TestProbe } import akka.testkit.{ ImplicitSender, TestActor, TestProbe }
import scala.concurrent.{ Await, Future } import scala.concurrent.Await
import scala.concurrent.duration._ import scala.concurrent.duration._
import scala.util.{ Failure, Try } import scala.util.{ Failure, Try }

View file

@ -189,7 +189,6 @@ class DslFactoriesConsistencySpec extends WordSpec with Matchers {
def returnTypeString(m: Method): String = def returnTypeString(m: Method): String =
m.returnType.getName.drop("akka.stream.".length) m.returnType.getName.drop("akka.stream.".length)
import language.existentials
case class Method(name: String, parameterTypes: List[Class[_]], returnType: Class[_], declaringClass: Class[_]) case class Method(name: String, parameterTypes: List[Class[_]], returnType: Class[_], declaringClass: Class[_])
sealed trait MatchResult { sealed trait MatchResult {

View file

@ -6,7 +6,6 @@ package akka.stream.impl
import akka.NotUsed import akka.NotUsed
import akka.stream._ import akka.stream._
import akka.stream.impl.StreamLayout.AtomicModule
import akka.stream.impl.TraversalTestUtils._ import akka.stream.impl.TraversalTestUtils._
import akka.stream.scaladsl.Keep import akka.stream.scaladsl.Keep
import akka.testkit.AkkaSpec import akka.testkit.AkkaSpec

View file

@ -4,7 +4,7 @@
package akka.stream.impl package akka.stream.impl
import java.util.concurrent.{ TimeUnit, TimeoutException } import java.util.concurrent.TimeoutException
import akka.Done import akka.Done
import akka.stream.scaladsl._ import akka.stream.scaladsl._
@ -361,7 +361,6 @@ class TimeoutsSpec extends StreamSpec {
class TimeoutChecksSpec extends WordSpecLike with Matchers { class TimeoutChecksSpec extends WordSpecLike with Matchers {
"Timeout check interval" must { "Timeout check interval" must {
import scala.concurrent.duration.{ Duration, FiniteDuration }
"run twice for timeouts under 800ms" in { "run twice for timeouts under 800ms" in {
Timers.timeoutCheckInterval(800.millis) should ===(100.millis) Timers.timeoutCheckInterval(800.millis) should ===(100.millis)

View file

@ -6,7 +6,6 @@ package akka.stream.impl
import akka.NotUsed import akka.NotUsed
import akka.stream._ import akka.stream._
import akka.stream.impl.TraversalBuilder.printTraversal
import akka.stream.impl.TraversalTestUtils._ import akka.stream.impl.TraversalTestUtils._
import akka.stream.scaladsl.{ BidiFlow, Flow, Keep, Sink, Source } import akka.stream.scaladsl.{ BidiFlow, Flow, Keep, Sink, Source }
import akka.stream.testkit.{ TestPublisher, TestSubscriber } import akka.stream.testkit.{ TestPublisher, TestSubscriber }

View file

@ -5,7 +5,6 @@
package akka.stream.impl.fusing package akka.stream.impl.fusing
import java.util.concurrent.CountDownLatch import java.util.concurrent.CountDownLatch
import java.util.concurrent.atomic.AtomicInteger
import akka.Done import akka.Done
import akka.stream._ import akka.stream._

View file

@ -11,10 +11,8 @@ import akka.stream.impl.fusing.GraphInterpreter.{ Connection, DownstreamBoundary
import akka.stream.stage.{ GraphStage, GraphStageLogic, InHandler, OutHandler, _ } import akka.stream.stage.{ GraphStage, GraphStageLogic, InHandler, OutHandler, _ }
import akka.stream.testkit.StreamSpec import akka.stream.testkit.StreamSpec
import akka.stream.testkit.Utils.TE import akka.stream.testkit.Utils.TE
import akka.util.OptionVal
import scala.collection.{ Map SMap } import scala.collection.{ Map SMap }
import scala.language.existentials
object GraphInterpreterSpecKit { object GraphInterpreterSpecKit {

View file

@ -12,7 +12,6 @@ import akka.stream.impl.fusing.GraphStages.SimpleLinearGraphStage
import akka.util.ConstantFun import akka.util.ConstantFun
class InterpreterSpec extends StreamSpec with GraphInterpreterSpecKit { class InterpreterSpec extends StreamSpec with GraphInterpreterSpecKit {
import Supervision.stoppingDecider
/* /*
* These tests were written for the previous version of the interpreter, the so called OneBoundedInterpreter. * These tests were written for the previous version of the interpreter, the so called OneBoundedInterpreter.

View file

@ -10,7 +10,6 @@ import akka.testkit.LongRunningTest
import akka.util.ConstantFun import akka.util.ConstantFun
class InterpreterStressSpec extends StreamSpec with GraphInterpreterSpecKit { class InterpreterStressSpec extends StreamSpec with GraphInterpreterSpecKit {
import Supervision.stoppingDecider
val chainLength = 1000 * 1000 val chainLength = 1000 * 1000
val halfLength = chainLength / 2 val halfLength = chainLength / 2

View file

@ -7,14 +7,9 @@ package akka.stream.impl.fusing
import akka.stream.testkit.StreamSpec import akka.stream.testkit.StreamSpec
import scala.util.control.NoStackTrace import scala.util.control.NoStackTrace
import akka.stream.{ ActorAttributes, Attributes, Supervision } import akka.stream.Supervision
import akka.stream.stage._
import akka.testkit.AkkaSpec
class InterpreterSupervisionSpec extends StreamSpec with GraphInterpreterSpecKit { class InterpreterSupervisionSpec extends StreamSpec with GraphInterpreterSpecKit {
import Supervision.stoppingDecider
import Supervision.resumingDecider
import Supervision.restartingDecider
val TE = new Exception("TEST") with NoStackTrace { val TE = new Exception("TEST") with NoStackTrace {
override def toString = "TE" override def toString = "TE"

View file

@ -13,7 +13,6 @@ import akka.stream.testkit.Utils.TE
import scala.concurrent.duration._ import scala.concurrent.duration._
class LifecycleInterpreterSpec extends StreamSpec with GraphInterpreterSpecKit { class LifecycleInterpreterSpec extends StreamSpec with GraphInterpreterSpecKit {
import akka.stream.Supervision._
"Interpreter" must { "Interpreter" must {

View file

@ -16,9 +16,8 @@ import akka.stream.scaladsl.{ FileIO, Sink, Source }
import akka.stream.testkit._ import akka.stream.testkit._
import akka.stream.testkit.Utils._ import akka.stream.testkit.Utils._
import akka.stream._ import akka.stream._
import akka.util.{ ByteString, Timeout } import akka.util.ByteString
import com.google.common.jimfs.{ Configuration, Jimfs } import com.google.common.jimfs.{ Configuration, Jimfs }
import org.scalatest.BeforeAndAfterAll
import scala.collection.mutable.ListBuffer import scala.collection.mutable.ListBuffer
import scala.concurrent.{ Await, Future } import scala.concurrent.{ Await, Future }

View file

@ -14,7 +14,7 @@ import akka.stream._
import akka.stream.impl.{ PhasedFusingActorMaterializer, StreamSupervisor } import akka.stream.impl.{ PhasedFusingActorMaterializer, StreamSupervisor }
import akka.stream.impl.StreamSupervisor.Children import akka.stream.impl.StreamSupervisor.Children
import akka.stream.impl.io.OutputStreamSourceStage import akka.stream.impl.io.OutputStreamSourceStage
import akka.stream.scaladsl.{ Keep, Sink, Source, StreamConverters } import akka.stream.scaladsl.{ Keep, Sink, StreamConverters }
import akka.stream.testkit.Utils._ import akka.stream.testkit.Utils._
import akka.stream.testkit._ import akka.stream.testkit._
import akka.stream.testkit.scaladsl.TestSink import akka.stream.testkit.scaladsl.TestSink

View file

@ -5,7 +5,6 @@
package akka.stream.io.compression package akka.stream.io.compression
import java.io.{ ByteArrayInputStream, ByteArrayOutputStream, InputStream, OutputStream } import java.io.{ ByteArrayInputStream, ByteArrayOutputStream, InputStream, OutputStream }
import java.util
import java.util.concurrent.ThreadLocalRandom import java.util.concurrent.ThreadLocalRandom
import java.util.zip.DataFormatException import java.util.zip.DataFormatException

View file

@ -8,7 +8,6 @@ import java.nio.charset.StandardCharsets
import akka.stream.impl.io.compression.{ DeflateCompressor, GzipCompressor } import akka.stream.impl.io.compression.{ DeflateCompressor, GzipCompressor }
import akka.stream.testkit.StreamSpec import akka.stream.testkit.StreamSpec
import akka.stream.testkit.scaladsl.TestSink
import akka.stream.{ ActorMaterializer, ActorMaterializerSettings } import akka.stream.{ ActorMaterializer, ActorMaterializerSettings }
import akka.util.ByteString import akka.util.ByteString

View file

@ -7,7 +7,7 @@ package akka.stream.scaladsl
import akka.{ Done, NotUsed } import akka.{ Done, NotUsed }
import akka.stream._ import akka.stream._
import akka.stream.testkit._ import akka.stream.testkit._
import akka.stream.testkit.scaladsl.{ TestSink, TestSource } import akka.stream.testkit.scaladsl.TestSource
import akka.testkit.TestProbe import akka.testkit.TestProbe
import org.reactivestreams.{ Publisher, Subscriber, Subscription } import org.reactivestreams.{ Publisher, Subscriber, Subscription }
import org.scalatest.Assertion import org.scalatest.Assertion

View file

@ -5,13 +5,9 @@
package akka.stream.scaladsl package akka.stream.scaladsl
import akka.stream.ActorMaterializer import akka.stream.ActorMaterializer
import akka.stream.testkit.{ StreamSpec, TestSubscriber, Utils } import akka.stream.testkit.{ StreamSpec, TestSubscriber }
import akka.testkit.DefaultTimeout import akka.testkit.DefaultTimeout
import org.scalatest.time.{ Millis, Span }
import scala.concurrent.Await
import scala.concurrent.duration._
import scala.util.Failure
import scala.util.control.NoStackTrace import scala.util.control.NoStackTrace
class FailedSourceSpec extends StreamSpec with DefaultTimeout { class FailedSourceSpec extends StreamSpec with DefaultTimeout {

View file

@ -4,25 +4,19 @@
package akka.stream.scaladsl package akka.stream.scaladsl
import java.util.concurrent.{ CountDownLatch, LinkedBlockingQueue, ThreadLocalRandom } import java.util.concurrent.ThreadLocalRandom
import java.util.concurrent.atomic.AtomicInteger
import akka.actor.{ Actor, ActorRef, PoisonPill, Props } import akka.actor.{ Actor, ActorRef, PoisonPill, Props }
import akka.stream.ActorAttributes.{ SupervisionStrategy, supervisionStrategy } import akka.stream.ActorAttributes.supervisionStrategy
import akka.stream.{ ActorAttributes, ActorMaterializer, Supervision } import akka.stream.{ ActorAttributes, ActorMaterializer, Supervision }
import akka.stream.Supervision.resumingDecider import akka.stream.Supervision.resumingDecider
import akka.stream.impl.ReactiveStreamsCompliance
import akka.stream.testkit.Utils._ import akka.stream.testkit.Utils._
import akka.stream.testkit._ import akka.stream.testkit._
import akka.stream.testkit.scaladsl.TestSink import akka.testkit.{ TestActors, TestProbe }
import akka.testkit.{ TestActors, TestLatch, TestProbe }
import org.scalatest.concurrent.PatienceConfiguration.Timeout
import scala.annotation.tailrec import scala.concurrent.{ Await, Future }
import scala.concurrent.{ Await, Future, Promise }
import scala.concurrent.duration._ import scala.concurrent.duration._
import scala.reflect.ClassTag import scala.reflect.ClassTag
import scala.util.control.NoStackTrace
object FlowAskSpec { object FlowAskSpec {
case class Reply(payload: Int) case class Reply(payload: Int)

View file

@ -4,9 +4,7 @@
package akka.stream.scaladsl package akka.stream.scaladsl
import java.util.concurrent.ThreadLocalRandom.{ current random } import akka.stream.testkit.StreamSpec
import akka.stream.testkit.{ ScriptedTest, StreamSpec }
import akka.stream.{ ActorMaterializer, ActorMaterializerSettings } import akka.stream.{ ActorMaterializer, ActorMaterializerSettings }
class FlowCollectTypeSpec extends StreamSpec { class FlowCollectTypeSpec extends StreamSpec {

View file

@ -11,7 +11,6 @@ import akka.stream.Supervision.{ restartingDecider, resumingDecider }
import akka.stream.impl.ReactiveStreamsCompliance import akka.stream.impl.ReactiveStreamsCompliance
import akka.stream.testkit.Utils._ import akka.stream.testkit.Utils._
import akka.stream.testkit._ import akka.stream.testkit._
import akka.testkit.TestLatch
import org.scalatest.concurrent.PatienceConfiguration.Timeout import org.scalatest.concurrent.PatienceConfiguration.Timeout
import scala.concurrent.duration._ import scala.concurrent.duration._

View file

@ -21,8 +21,6 @@ import akka.stream.impl.fusing.GroupBy
import akka.stream.testkit._ import akka.stream.testkit._
import akka.stream.testkit.Utils._ import akka.stream.testkit.Utils._
import org.reactivestreams.Publisher import org.reactivestreams.Publisher
import org.scalatest.concurrent.ScalaFutures
import org.scalactic.ConversionCheckedTripleEquals
import org.scalatest.concurrent.PatienceConfiguration.Timeout import org.scalatest.concurrent.PatienceConfiguration.Timeout
import akka.stream.testkit.scaladsl.TestSource import akka.stream.testkit.scaladsl.TestSource
import akka.stream.testkit.scaladsl.TestSink import akka.stream.testkit.scaladsl.TestSink

View file

@ -12,7 +12,6 @@ import akka.stream.{ ActorMaterializer, ActorMaterializerSettings, ThrottleMode
import akka.stream.testkit._ import akka.stream.testkit._
import akka.stream.testkit.Utils._ import akka.stream.testkit.Utils._
import scala.concurrent.Await
import akka.testkit.TimingTest import akka.testkit.TimingTest
import akka.util.ConstantFun import akka.util.ConstantFun

View file

@ -11,7 +11,7 @@ import akka.stream.Attributes.LogLevels
import akka.stream.Supervision._ import akka.stream.Supervision._
import akka.stream.testkit.{ StreamSpec, ScriptedTest } import akka.stream.testkit.{ StreamSpec, ScriptedTest }
import akka.stream._ import akka.stream._
import akka.testkit.{ AkkaSpec, TestProbe } import akka.testkit.TestProbe
import scala.concurrent.duration._ import scala.concurrent.duration._
import scala.concurrent.Await import scala.concurrent.Await

View file

@ -7,7 +7,7 @@ package akka.stream.scaladsl
import java.util.concurrent.{ LinkedBlockingQueue, ThreadLocalRandom } import java.util.concurrent.{ LinkedBlockingQueue, ThreadLocalRandom }
import java.util.concurrent.atomic.AtomicInteger import java.util.concurrent.atomic.AtomicInteger
import akka.stream.ActorAttributes.{ SupervisionStrategy, supervisionStrategy } import akka.stream.ActorAttributes.supervisionStrategy
import akka.stream.{ ActorAttributes, ActorMaterializer, Supervision } import akka.stream.{ ActorAttributes, ActorMaterializer, Supervision }
import akka.stream.Supervision.resumingDecider import akka.stream.Supervision.resumingDecider
import akka.stream.impl.ReactiveStreamsCompliance import akka.stream.impl.ReactiveStreamsCompliance
@ -406,7 +406,6 @@ class FlowMapAsyncSpec extends StreamSpec {
} }
"not invoke the decider twice for the same already failed future" in { "not invoke the decider twice for the same already failed future" in {
import system.dispatcher
val failCount = new AtomicInteger(0) val failCount = new AtomicInteger(0)
val result = Source(List(true, false)) val result = Source(List(true, false))
.mapAsync(1)(elem .mapAsync(1)(elem

View file

@ -4,7 +4,7 @@
package akka.stream.scaladsl package akka.stream.scaladsl
import akka.{ NotUsed, pattern } import akka.pattern
import akka.stream.{ ActorAttributes, ActorMaterializer, Supervision } import akka.stream.{ ActorAttributes, ActorMaterializer, Supervision }
import akka.stream.impl.ReactiveStreamsCompliance import akka.stream.impl.ReactiveStreamsCompliance
import akka.stream.testkit.TestSubscriber.Probe import akka.stream.testkit.TestSubscriber.Probe

View file

@ -8,23 +8,18 @@ import java.util.concurrent.ThreadLocalRandom
import akka.NotUsed import akka.NotUsed
import akka.actor._ import akka.actor._
import akka.stream.Supervision._
import akka.stream.impl._ import akka.stream.impl._
import akka.stream.impl.fusing.ActorGraphInterpreter
import akka.stream.testkit.Utils._ import akka.stream.testkit.Utils._
import akka.stream.testkit._ import akka.stream.testkit._
import akka.stream._ import akka.stream._
import akka.testkit.TestEvent.{ Mute, UnMute } import akka.testkit.TestDuration
import akka.testkit.{ EventFilter, TestDuration }
import com.typesafe.config.ConfigFactory import com.typesafe.config.ConfigFactory
import org.reactivestreams.{ Publisher, Subscriber } import org.reactivestreams.{ Publisher, Subscriber }
import org.scalatest.concurrent.ScalaFutures
import scala.collection.immutable import scala.collection.immutable
import scala.concurrent.Await import scala.concurrent.Await
import scala.concurrent.duration._ import scala.concurrent.duration._
import scala.util.control.NoStackTrace import scala.util.control.NoStackTrace
import akka.stream.impl.fusing.GraphInterpreterShell
object FlowSpec { object FlowSpec {
class Fruit class Fruit

View file

@ -6,7 +6,6 @@ package akka.stream.scaladsl
import java.util.concurrent.{ CompletableFuture, TimeUnit } import java.util.concurrent.{ CompletableFuture, TimeUnit }
import akka.Done
import akka.stream._ import akka.stream._
import akka.stream.stage.{ GraphStageLogic, GraphStageWithMaterializedValue } import akka.stream.stage.{ GraphStageLogic, GraphStageWithMaterializedValue }
import akka.stream.testkit.Utils.{ TE, assertAllStagesStopped } import akka.stream.testkit.Utils.{ TE, assertAllStagesStopped }

View file

@ -11,7 +11,6 @@ import akka.stream._
import akka.stream.testkit._ import akka.stream.testkit._
import akka.stream.testkit.scaladsl._ import akka.stream.testkit.scaladsl._
import akka.stream.testkit.Utils._ import akka.stream.testkit.Utils._
import akka.util.ByteString
class GraphBalanceSpec extends StreamSpec { class GraphBalanceSpec extends StreamSpec {

View file

@ -4,7 +4,6 @@
package akka.stream.scaladsl package akka.stream.scaladsl
import akka.NotUsed
import akka.stream.impl.fusing.GraphStages import akka.stream.impl.fusing.GraphStages
import akka.stream._ import akka.stream._
import akka.stream.testkit._ import akka.stream.testkit._
@ -365,7 +364,6 @@ class GraphDSLCompileSpec extends StreamSpec {
"suitably override attribute handling methods" in { "suitably override attribute handling methods" in {
import akka.stream.Attributes._ import akka.stream.Attributes._
val ga = GraphDSL.create() { implicit b val ga = GraphDSL.create() { implicit b
import GraphDSL.Implicits._
val id = b.add(GraphStages.identity[Any]) val id = b.add(GraphStages.identity[Any])
FlowShape(id.in, id.out) FlowShape(id.in, id.out)

View file

@ -5,7 +5,6 @@
package akka.stream.scaladsl package akka.stream.scaladsl
import akka.NotUsed import akka.NotUsed
import akka.stream.impl.Throttle
import akka.stream.testkit.TestSubscriber.ManualProbe import akka.stream.testkit.TestSubscriber.ManualProbe
import akka.stream.{ ClosedShape, Inlet, Outlet } import akka.stream.{ ClosedShape, Inlet, Outlet }
import akka.stream.testkit.{ TestSubscriber, TwoStreamsSetup } import akka.stream.testkit.{ TestSubscriber, TwoStreamsSetup }

View file

@ -8,9 +8,6 @@ import akka.stream._
import akka.stream.testkit.TwoStreamsSetup import akka.stream.testkit.TwoStreamsSetup
import org.scalacheck.Gen import org.scalacheck.Gen
import org.scalatest.prop.GeneratorDrivenPropertyChecks import org.scalatest.prop.GeneratorDrivenPropertyChecks
import org.scalatest.concurrent.ScalaFutures
import scala.concurrent.duration._
import org.scalactic.ConversionCheckedTripleEquals
import org.scalacheck.Shrink import org.scalacheck.Shrink
class GraphMergeSortedSpec extends TwoStreamsSetup with GeneratorDrivenPropertyChecks { class GraphMergeSortedSpec extends TwoStreamsSetup with GeneratorDrivenPropertyChecks {

View file

@ -7,7 +7,6 @@ package akka.stream.scaladsl
import akka.stream.testkit._ import akka.stream.testkit._
import akka.stream.{ OverflowStrategy, ActorMaterializer, ActorMaterializerSettings, ClosedShape } import akka.stream.{ OverflowStrategy, ActorMaterializer, ActorMaterializerSettings, ClosedShape }
import akka.stream.testkit.Utils._ import akka.stream.testkit.Utils._
import org.scalatest.concurrent.ScalaFutures
import scala.concurrent.Await import scala.concurrent.Await
import scala.concurrent.duration._ import scala.concurrent.duration._

View file

@ -8,7 +8,6 @@ import akka.stream.testkit._
import akka.stream.testkit.Utils._ import akka.stream.testkit.Utils._
import akka.stream._ import akka.stream._
import scala.concurrent.Await
import scala.concurrent.duration._ import scala.concurrent.duration._
import scala.collection.immutable import scala.collection.immutable

View file

@ -7,7 +7,7 @@ package akka.stream.scaladsl
import scala.concurrent.Await import scala.concurrent.Await
import scala.concurrent.Future import scala.concurrent.Future
import scala.concurrent.duration._ import scala.concurrent.duration._
import akka.stream.{ AbruptStageTerminationException, AbruptTerminationException, ActorMaterializer, ActorMaterializerSettings } import akka.stream.{ AbruptTerminationException, ActorMaterializer, ActorMaterializerSettings }
import akka.stream.testkit._ import akka.stream.testkit._
import akka.stream.testkit.Utils._ import akka.stream.testkit.Utils._

View file

@ -6,6 +6,8 @@ package akka.stream.scaladsl
import akka.NotUsed import akka.NotUsed
import akka.stream._ import akka.stream._
import akka.stream.stage.{ GraphStageLogic, GraphStageWithMaterializedValue }
import akka.stream.testkit.{ StreamSpec, TestPublisher }
import akka.stream.testkit.Utils._ import akka.stream.testkit.Utils._
import akka.stream.testkit.scaladsl.{ TestSink, TestSource } import akka.stream.testkit.scaladsl.{ TestSink, TestSource }
import akka.stream.testkit.{ StreamSpec, TestPublisher } import akka.stream.testkit.{ StreamSpec, TestPublisher }

View file

@ -8,7 +8,7 @@ import java.util.concurrent.atomic.AtomicBoolean
import akka.Done import akka.Done
import akka.stream.impl.LazySource import akka.stream.impl.LazySource
import akka.stream.stage.{ GraphStage, GraphStageLogic, OutHandler } import akka.stream.stage.{ GraphStage, GraphStageLogic }
import akka.stream.testkit.Utils.{ TE, assertAllStagesStopped } import akka.stream.testkit.Utils.{ TE, assertAllStagesStopped }
import akka.stream.testkit.{ StreamSpec, TestPublisher, TestSubscriber } import akka.stream.testkit.{ StreamSpec, TestPublisher, TestSubscriber }
import akka.stream.{ ActorMaterializer, Attributes, Outlet, SourceShape } import akka.stream.{ ActorMaterializer, Attributes, Outlet, SourceShape }

View file

@ -7,11 +7,8 @@ package akka.stream.scaladsl
import akka.stream.{ AbruptStageTerminationException, ActorMaterializer } import akka.stream.{ AbruptStageTerminationException, ActorMaterializer }
import akka.stream.testkit.{ StreamSpec, TestSubscriber, Utils } import akka.stream.testkit.{ StreamSpec, TestSubscriber, Utils }
import akka.testkit.DefaultTimeout import akka.testkit.DefaultTimeout
import org.scalatest.time.{ Millis, Span }
import scala.concurrent.duration._ import scala.concurrent.duration._
import scala.concurrent.Await
import scala.util.Failure
import scala.util.control.NoStackTrace import scala.util.control.NoStackTrace
class MaybeSourceSpec extends StreamSpec with DefaultTimeout { class MaybeSourceSpec extends StreamSpec with DefaultTimeout {

View file

@ -8,7 +8,6 @@ import akka.stream.testkit._
import akka.stream._ import akka.stream._
import scala.concurrent.Await import scala.concurrent.Await
import scala.concurrent.duration._ import scala.concurrent.duration._
import org.scalactic.ConversionCheckedTripleEquals
class ReverseArrowSpec extends StreamSpec { class ReverseArrowSpec extends StreamSpec {
import GraphDSL.Implicits._ import GraphDSL.Implicits._

View file

@ -5,12 +5,9 @@
package akka.stream.scaladsl package akka.stream.scaladsl
import akka.testkit.DefaultTimeout import akka.testkit.DefaultTimeout
import org.scalatest.concurrent.ScalaFutures
import org.scalatest.time.{ Span, Millis } import org.scalatest.time.{ Span, Millis }
import scala.concurrent.{ Await, Future, Promise } import scala.concurrent.{ Await, Future }
import scala.concurrent.duration._ import scala.concurrent.duration._
import scala.util.Failure
import scala.util.control.NoStackTrace
import akka.stream._ import akka.stream._
import akka.stream.testkit._ import akka.stream.testkit._
import akka.NotUsed import akka.NotUsed

View file

@ -4,7 +4,7 @@
package akka.stream.scaladsl package akka.stream.scaladsl
import akka.{ Done, NotUsed } import akka.NotUsed
import akka.actor.Status.Failure import akka.actor.Status.Failure
import akka.actor.{ Actor, ActorIdentity, ActorLogging, ActorRef, ActorSystem, ActorSystemImpl, Identify, Props } import akka.actor.{ Actor, ActorIdentity, ActorLogging, ActorRef, ActorSystem, ActorSystemImpl, Identify, Props }
import akka.pattern._ import akka.pattern._
@ -12,13 +12,11 @@ import akka.stream.testkit.TestPublisher
import akka.stream.testkit.scaladsl._ import akka.stream.testkit.scaladsl._
import akka.stream._ import akka.stream._
import akka.testkit.{ AkkaSpec, ImplicitSender, SocketUtil, TestKit, TestProbe } import akka.testkit.{ AkkaSpec, ImplicitSender, SocketUtil, TestKit, TestProbe }
import akka.util.{ ByteString, PrettyDuration } import akka.util.ByteString
import com.typesafe.config._ import com.typesafe.config._
import scala.collection.immutable
import scala.concurrent.duration._ import scala.concurrent.duration._
import scala.concurrent.Future import scala.concurrent.Future
import scala.util.Success
import scala.util.control.NoStackTrace import scala.util.control.NoStackTrace
object StreamRefsSpec { object StreamRefsSpec {

View file

@ -4,7 +4,7 @@
package akka.stream.scaladsl package akka.stream.scaladsl
import java.util.concurrent.atomic.{ AtomicBoolean, AtomicInteger } import java.util.concurrent.atomic.AtomicInteger
import akka.Done import akka.Done
import akka.actor.ActorSystem import akka.actor.ActorSystem