+build Add sort imports support. (#28780)

* Add scalafix plugin for jdk 9.
* Add command alias sortImports.
* Excludes some sources from SortImports.
* Update SortImports to 0.4.0
* Sort imports with `sortImports` command.
This commit is contained in:
kerr 2020-04-27 20:32:18 +08:00 committed by GitHub
parent ea7205eaf7
commit 0e4d41ad33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1534 changed files with 7454 additions and 6165 deletions

View file

@ -1,6 +1,7 @@
// .scalafix.conf // .scalafix.conf
rules = [ rules = [
RemoveUnused RemoveUnused
SortImports
ExplicitResultTypes ExplicitResultTypes
"github:ohze/scalafix-rules/ExplicitNonNullaryApply" "github:ohze/scalafix-rules/ExplicitNonNullaryApply"
"github:ohze/scalafix-rules/ConstructorProcedureSyntax" "github:ohze/scalafix-rules/ConstructorProcedureSyntax"
@ -21,7 +22,11 @@ ignored-files = [
"FlowPrependSpec.scala", "FlowPrependSpec.scala",
"FlowZipSpec.scala", "FlowZipSpec.scala",
"FlowZipWithSpec.scala", "FlowZipWithSpec.scala",
"FlowZipWithIndexSpec.scala" "FlowZipWithIndexSpec.scala",
"SourceSpec.scala",
"StatsSampleSpec.scala",
"ActorFlowSpec.scala",
"FSMTimingSpec.scala"
] ]
//ignored packages //ignored packages
@ -29,3 +34,13 @@ ignored-packages = [
"doc", "doc",
"jdoc" "jdoc"
] ]
//sort imports, see https://github.com/NeQuissimus/sort-imports
SortImports.asciiSort = false
SortImports.blocks = [
"java.",
"scala.",
"*",
"com.sun."
"akka."
]

View file

@ -6,13 +6,14 @@ package akka.actor.testkit.typed
import java.util.Optional import java.util.Optional
import akka.annotation.InternalApi
import akka.util.OptionVal
import scala.compat.java8.OptionConverters._ import scala.compat.java8.OptionConverters._
import org.slf4j.Marker import org.slf4j.Marker
import org.slf4j.event.Level import org.slf4j.event.Level
import akka.annotation.InternalApi
import akka.util.OptionVal
/** /**
* Representation of a Log Event issued by a [[akka.actor.typed.Behavior]] * Representation of a Log Event issued by a [[akka.actor.typed.Behavior]]
* when testing with [[akka.actor.testkit.typed.scaladsl.BehaviorTestKit]] * when testing with [[akka.actor.testkit.typed.scaladsl.BehaviorTestKit]]

View file

@ -4,14 +4,14 @@
package akka.actor.testkit.typed package akka.actor.testkit.typed
import scala.compat.java8.FunctionConverters._
import scala.concurrent.duration.FiniteDuration
import akka.actor.typed.{ ActorRef, Behavior, Props } import akka.actor.typed.{ ActorRef, Behavior, Props }
import akka.annotation.{ DoNotInherit, InternalApi } import akka.annotation.{ DoNotInherit, InternalApi }
import akka.util.JavaDurationConverters._ import akka.util.JavaDurationConverters._
import akka.util.unused import akka.util.unused
import scala.compat.java8.FunctionConverters._
import scala.concurrent.duration.FiniteDuration
/** /**
* All tracked effects for the [[akka.actor.testkit.typed.scaladsl.BehaviorTestKit]] and * All tracked effects for the [[akka.actor.testkit.typed.scaladsl.BehaviorTestKit]] and
* [[akka.actor.testkit.typed.javadsl.BehaviorTestKit]] must extend this type. * [[akka.actor.testkit.typed.javadsl.BehaviorTestKit]] must extend this type.

View file

@ -4,14 +4,15 @@
package akka.actor.testkit.typed package akka.actor.testkit.typed
import scala.compat.java8.OptionConverters._
import akka.util.ccompat.JavaConverters._
import java.util.Optional import java.util.Optional
import scala.compat.java8.OptionConverters._
import org.slf4j.Marker import org.slf4j.Marker
import org.slf4j.event.Level import org.slf4j.event.Level
import akka.util.ccompat.JavaConverters._
object LoggingEvent { object LoggingEvent {
/** /**

View file

@ -4,14 +4,15 @@
package akka.actor.testkit.typed package akka.actor.testkit.typed
import com.typesafe.config.Config
import scala.concurrent.duration.{ Duration, FiniteDuration } import scala.concurrent.duration.{ Duration, FiniteDuration }
import akka.util.JavaDurationConverters._ import com.typesafe.config.Config
import akka.util.Timeout
import akka.actor.typed.ActorSystem import akka.actor.typed.ActorSystem
import akka.actor.typed.Extension import akka.actor.typed.Extension
import akka.actor.typed.ExtensionId import akka.actor.typed.ExtensionId
import akka.util.JavaDurationConverters._
import akka.util.Timeout
object TestKitSettings { object TestKitSettings {

View file

@ -6,7 +6,17 @@ package akka.actor.testkit.typed.internal
import java.util.concurrent.{ CompletionStage, ThreadFactory } import java.util.concurrent.{ CompletionStage, ThreadFactory }
import akka.actor.typed.internal.ActorRefImpl import scala.compat.java8.FutureConverters
import scala.concurrent._
import com.github.ghik.silencer.silent
import com.typesafe.config.ConfigFactory
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import akka.{ actor => classic }
import akka.Done
import akka.actor.{ ActorPath, ActorRefProvider, Address, ReflectiveDynamicAccess }
import akka.actor.typed.ActorRef import akka.actor.typed.ActorRef
import akka.actor.typed.ActorSystem import akka.actor.typed.ActorSystem
import akka.actor.typed.Behavior import akka.actor.typed.Behavior
@ -17,18 +27,9 @@ import akka.actor.typed.ExtensionId
import akka.actor.typed.Props import akka.actor.typed.Props
import akka.actor.typed.Scheduler import akka.actor.typed.Scheduler
import akka.actor.typed.Settings import akka.actor.typed.Settings
import akka.annotation.InternalApi import akka.actor.typed.internal.ActorRefImpl
import akka.{ actor => classic }
import akka.Done
import com.typesafe.config.ConfigFactory
import scala.compat.java8.FutureConverters
import scala.concurrent._
import akka.actor.{ ActorPath, ActorRefProvider, Address, ReflectiveDynamicAccess }
import akka.actor.typed.internal.InternalRecipientRef import akka.actor.typed.internal.InternalRecipientRef
import com.github.ghik.silencer.silent import akka.annotation.InternalApi
import org.slf4j.Logger
import org.slf4j.LoggerFactory
/** /**
* INTERNAL API * INTERNAL API

View file

@ -6,19 +6,19 @@ package akka.actor.testkit.typed.internal
import java.util import java.util
import akka.actor.ActorPath
import akka.actor.typed.{ ActorRef, Behavior, PostStop, Signal }
import akka.annotation.InternalApi
import akka.actor.testkit.typed.{ CapturedLogEvent, Effect }
import akka.actor.testkit.typed.Effect._
import scala.annotation.tailrec import scala.annotation.tailrec
import akka.util.ccompat.JavaConverters._
import scala.collection.immutable import scala.collection.immutable
import scala.reflect.ClassTag import scala.reflect.ClassTag
import scala.util.control.Exception.Catcher import scala.util.control.Exception.Catcher
import scala.util.control.NonFatal import scala.util.control.NonFatal
import akka.actor.ActorPath
import akka.actor.testkit.typed.{ CapturedLogEvent, Effect }
import akka.actor.testkit.typed.Effect._
import akka.actor.typed.{ ActorRef, Behavior, PostStop, Signal }
import akka.annotation.InternalApi
import akka.util.ccompat.JavaConverters._
/** /**
* INTERNAL API * INTERNAL API
*/ */

View file

@ -4,10 +4,11 @@
package akka.actor.testkit.typed.internal package akka.actor.testkit.typed.internal
import akka.annotation.InternalApi
import ch.qos.logback.classic.spi.ILoggingEvent import ch.qos.logback.classic.spi.ILoggingEvent
import ch.qos.logback.core.AppenderBase import ch.qos.logback.core.AppenderBase
import akka.annotation.InternalApi
/** /**
* INTERNAL API * INTERNAL API
*/ */

View file

@ -6,10 +6,10 @@ package akka.actor.testkit.typed.internal
import java.util.LinkedList import java.util.LinkedList
import akka.annotation.InternalApi
import scala.concurrent.ExecutionContextExecutor import scala.concurrent.ExecutionContextExecutor
import akka.annotation.InternalApi
/** /**
* INTERNAL API * INTERNAL API
*/ */

View file

@ -6,14 +6,14 @@ package akka.actor.testkit.typed.internal
import java.util.concurrent.ConcurrentLinkedQueue import java.util.concurrent.ConcurrentLinkedQueue
import akka.actor.typed.ActorRef
import akka.actor.typed.internal.{ ActorRefImpl, SystemMessage }
import akka.annotation.InternalApi
import akka.{ actor => classic }
import scala.annotation.tailrec import scala.annotation.tailrec
import akka.{ actor => classic }
import akka.actor.ActorRefProvider import akka.actor.ActorRefProvider
import akka.actor.typed.ActorRef
import akka.actor.typed.internal.{ ActorRefImpl, SystemMessage }
import akka.actor.typed.internal.InternalRecipientRef import akka.actor.typed.internal.InternalRecipientRef
import akka.annotation.InternalApi
/** /**
* INTERNAL API * INTERNAL API

View file

@ -6,15 +6,15 @@ package akka.actor.testkit.typed.internal
import java.util.concurrent.ConcurrentLinkedQueue import java.util.concurrent.ConcurrentLinkedQueue
import akka.actor.{ ActorPath, Cancellable }
import akka.actor.typed.{ ActorRef, Behavior, Props }
import akka.annotation.InternalApi
import akka.actor.testkit.typed.Effect
import akka.actor.testkit.typed.Effect._
import scala.concurrent.duration.FiniteDuration import scala.concurrent.duration.FiniteDuration
import scala.reflect.ClassTag import scala.reflect.ClassTag
import akka.actor.{ ActorPath, Cancellable }
import akka.actor.testkit.typed.Effect
import akka.actor.testkit.typed.Effect._
import akka.actor.typed.{ ActorRef, Behavior, Props }
import akka.annotation.InternalApi
/** /**
* INTERNAL API * INTERNAL API
*/ */

View file

@ -4,10 +4,11 @@
package akka.actor.testkit.typed.internal package akka.actor.testkit.typed.internal
import akka.annotation.InternalApi
import org.slf4j.LoggerFactory import org.slf4j.LoggerFactory
import org.slf4j.event.Level import org.slf4j.event.Level
import akka.annotation.InternalApi
/** /**
* INTERNAL API * INTERNAL API
*/ */

View file

@ -10,6 +10,8 @@ import scala.concurrent.duration.Duration
import scala.reflect.ClassTag import scala.reflect.ClassTag
import scala.util.matching.Regex import scala.util.matching.Regex
import org.slf4j.event.Level
import akka.actor.testkit.typed.LoggingEvent import akka.actor.testkit.typed.LoggingEvent
import akka.actor.testkit.typed.TestKitSettings import akka.actor.testkit.typed.TestKitSettings
import akka.actor.testkit.typed.javadsl import akka.actor.testkit.typed.javadsl
@ -17,7 +19,6 @@ import akka.actor.testkit.typed.scaladsl
import akka.actor.typed.ActorSystem import akka.actor.typed.ActorSystem
import akka.annotation.InternalApi import akka.annotation.InternalApi
import akka.testkit.TestKit import akka.testkit.TestKit
import org.slf4j.event.Level
/** /**
* INTERNAL API * INTERNAL API

View file

@ -4,25 +4,26 @@
package akka.actor.testkit.typed.internal package akka.actor.testkit.typed.internal
import akka.actor.typed._
import akka.actor.typed.internal._
import akka.actor.testkit.typed.CapturedLogEvent
import akka.actor.testkit.typed.scaladsl.TestInbox
import akka.actor.{ ActorPath, InvalidMessageException }
import akka.annotation.InternalApi
import akka.util.Helpers
import akka.{ actor => classic }
import java.util.concurrent.ThreadLocalRandom.{ current => rnd } import java.util.concurrent.ThreadLocalRandom.{ current => rnd }
import scala.collection.immutable.TreeMap import scala.collection.immutable.TreeMap
import scala.concurrent.ExecutionContextExecutor import scala.concurrent.ExecutionContextExecutor
import scala.concurrent.duration.FiniteDuration import scala.concurrent.duration.FiniteDuration
import akka.actor.ActorRefProvider
import org.slf4j.Logger import org.slf4j.Logger
import org.slf4j.helpers.MessageFormatter import org.slf4j.helpers.MessageFormatter
import org.slf4j.helpers.SubstituteLoggerFactory import org.slf4j.helpers.SubstituteLoggerFactory
import akka.{ actor => classic }
import akka.actor.{ ActorPath, InvalidMessageException }
import akka.actor.ActorRefProvider
import akka.actor.testkit.typed.CapturedLogEvent
import akka.actor.testkit.typed.scaladsl.TestInbox
import akka.actor.typed._
import akka.actor.typed.internal._
import akka.annotation.InternalApi
import akka.util.Helpers
/** /**
* INTERNAL API * INTERNAL API
* *

View file

@ -4,12 +4,13 @@
package akka.actor.testkit.typed.internal package akka.actor.testkit.typed.internal
import akka.actor.testkit.typed.LoggingEvent
import akka.annotation.InternalApi
import ch.qos.logback.classic.spi.ILoggingEvent import ch.qos.logback.classic.spi.ILoggingEvent
import ch.qos.logback.classic.spi.ThrowableProxy import ch.qos.logback.classic.spi.ThrowableProxy
import ch.qos.logback.core.AppenderBase import ch.qos.logback.core.AppenderBase
import akka.actor.testkit.typed.LoggingEvent
import akka.annotation.InternalApi
/** /**
* INTERNAL API * INTERNAL API
* *

View file

@ -6,13 +6,13 @@ package akka.actor.testkit.typed.internal
import java.util.concurrent.ConcurrentLinkedQueue import java.util.concurrent.ConcurrentLinkedQueue
import akka.actor.typed.ActorRef
import akka.actor.ActorPath
import akka.annotation.InternalApi
import scala.annotation.tailrec import scala.annotation.tailrec
import scala.collection.immutable import scala.collection.immutable
import akka.actor.ActorPath
import akka.actor.typed.ActorRef
import akka.annotation.InternalApi
/** /**
* INTERNAL API * INTERNAL API
*/ */

View file

@ -4,16 +4,15 @@
package akka.actor.testkit.typed.internal package akka.actor.testkit.typed.internal
import scala.util.control.Exception.Catcher
import akka.actor.typed.scaladsl.Behaviors
import akka.actor.typed.{ ActorRef, ActorSystem, Behavior, Props }
import akka.annotation.InternalApi
import scala.concurrent.{ Await, TimeoutException } import scala.concurrent.{ Await, TimeoutException }
import scala.concurrent.duration.Duration import scala.concurrent.duration.Duration
import scala.util.control.Exception.Catcher
import scala.util.control.NonFatal import scala.util.control.NonFatal
import akka.actor.typed.{ ActorRef, ActorSystem, Behavior, Props }
import akka.actor.typed.scaladsl.ActorContext import akka.actor.typed.scaladsl.ActorContext
import akka.actor.typed.scaladsl.Behaviors
import akka.annotation.InternalApi
/** /**
* INTERNAL API * INTERNAL API

View file

@ -5,23 +5,22 @@
package akka.actor.testkit.typed.internal package akka.actor.testkit.typed.internal
import java.time.{ Duration => JDuration } import java.time.{ Duration => JDuration }
import java.util.{ List => JList }
import java.util.concurrent.BlockingDeque import java.util.concurrent.BlockingDeque
import java.util.concurrent.LinkedBlockingDeque import java.util.concurrent.LinkedBlockingDeque
import java.util.function.Supplier import java.util.function.Supplier
import java.util.{ List => JList }
import scala.annotation.tailrec import scala.annotation.tailrec
import akka.util.ccompat.JavaConverters._
import scala.collection.immutable import scala.collection.immutable
import scala.concurrent.duration._ import scala.concurrent.duration._
import scala.reflect.ClassTag import scala.reflect.ClassTag
import scala.util.control.NonFatal import scala.util.control.NonFatal
import akka.actor.testkit.typed.FishingOutcome import akka.actor.testkit.typed.FishingOutcome
import akka.actor.testkit.typed.TestKitSettings import akka.actor.testkit.typed.TestKitSettings
import akka.actor.testkit.typed.javadsl.{ TestProbe => JavaTestProbe } import akka.actor.testkit.typed.javadsl.{ TestProbe => JavaTestProbe }
import akka.actor.testkit.typed.scaladsl.TestDuration
import akka.actor.testkit.typed.scaladsl.{ TestProbe => ScalaTestProbe } import akka.actor.testkit.typed.scaladsl.{ TestProbe => ScalaTestProbe }
import akka.actor.testkit.typed.scaladsl.TestDuration
import akka.actor.typed.ActorRef import akka.actor.typed.ActorRef
import akka.actor.typed.ActorSystem import akka.actor.typed.ActorSystem
import akka.actor.typed.Behavior import akka.actor.typed.Behavior
@ -32,6 +31,7 @@ import akka.annotation.InternalApi
import akka.util.BoxedType import akka.util.BoxedType
import akka.util.JavaDurationConverters._ import akka.util.JavaDurationConverters._
import akka.util.PrettyDuration._ import akka.util.PrettyDuration._
import akka.util.ccompat.JavaConverters._
@InternalApi @InternalApi
private[akka] object TestProbeImpl { private[akka] object TestProbeImpl {

View file

@ -6,6 +6,8 @@ package akka.actor.testkit.typed.javadsl
import java.time.Duration import java.time.Duration
import com.typesafe.config.Config
import akka.actor.DeadLetter import akka.actor.DeadLetter
import akka.actor.Dropped import akka.actor.Dropped
import akka.actor.UnhandledMessage import akka.actor.UnhandledMessage
@ -19,7 +21,6 @@ import akka.actor.typed.Props
import akka.actor.typed.Scheduler import akka.actor.typed.Scheduler
import akka.util.JavaDurationConverters._ import akka.util.JavaDurationConverters._
import akka.util.Timeout import akka.util.Timeout
import com.typesafe.config.Config
object ActorTestKit { object ActorTestKit {

View file

@ -4,11 +4,12 @@
package akka.actor.testkit.typed.javadsl package akka.actor.testkit.typed.javadsl
import akka.actor.testkit.typed.internal.BehaviorTestKitImpl import java.util.concurrent.ThreadLocalRandom
import akka.actor.testkit.typed.{ CapturedLogEvent, Effect } import akka.actor.testkit.typed.{ CapturedLogEvent, Effect }
import akka.actor.testkit.typed.internal.BehaviorTestKitImpl
import akka.actor.typed.{ ActorRef, Behavior, Signal } import akka.actor.typed.{ ActorRef, Behavior, Signal }
import akka.annotation.{ ApiMayChange, DoNotInherit } import akka.annotation.{ ApiMayChange, DoNotInherit }
import java.util.concurrent.ThreadLocalRandom
object BehaviorTestKit { object BehaviorTestKit {
import akka.actor.testkit.typed.scaladsl.TestInbox.address import akka.actor.testkit.typed.scaladsl.TestInbox.address

View file

@ -6,12 +6,13 @@ package akka.actor.testkit.typed.javadsl
import scala.util.control.NonFatal import scala.util.control.NonFatal
import akka.actor.testkit.typed.internal.CapturingAppender
import org.junit.rules.TestRule import org.junit.rules.TestRule
import org.junit.runner.Description import org.junit.runner.Description
import org.junit.runners.model.Statement import org.junit.runners.model.Statement
import org.slf4j.LoggerFactory import org.slf4j.LoggerFactory
import akka.actor.testkit.typed.internal.CapturingAppender
/** /**
* JUnit `TestRule` to make log lines appear only when the test failed. * JUnit `TestRule` to make log lines appear only when the test failed.
* *

View file

@ -6,11 +6,12 @@ package akka.actor.testkit.typed.javadsl
import java.util.function.Supplier import java.util.function.Supplier
import org.slf4j.event.Level
import akka.actor.testkit.typed.LoggingEvent import akka.actor.testkit.typed.LoggingEvent
import akka.actor.testkit.typed.internal.LoggingTestKitImpl import akka.actor.testkit.typed.internal.LoggingTestKitImpl
import akka.actor.typed.ActorSystem import akka.actor.typed.ActorSystem
import akka.annotation.DoNotInherit import akka.annotation.DoNotInherit
import org.slf4j.event.Level
/** /**
* Facilities for verifying logs. * Facilities for verifying logs.

View file

@ -6,13 +6,14 @@ package akka.actor.testkit.typed.javadsl
import java.time.Duration import java.time.Duration
import scala.annotation.varargs
import com.typesafe.config.Config
import akka.actor.typed.ActorSystem import akka.actor.typed.ActorSystem
import akka.actor.typed.internal.adapter.SchedulerAdapter import akka.actor.typed.internal.adapter.SchedulerAdapter
import com.typesafe.config.Config
import akka.util.JavaDurationConverters._ import akka.util.JavaDurationConverters._
import scala.annotation.varargs
/** /**
* Manual time allows you to do async tests while controlling the scheduler of the system. * Manual time allows you to do async tests while controlling the scheduler of the system.
* *

View file

@ -4,15 +4,15 @@
package akka.actor.testkit.typed.javadsl package akka.actor.testkit.typed.javadsl
import akka.actor.typed.ActorRef
import akka.annotation.DoNotInherit
import akka.actor.testkit.typed.internal.TestInboxImpl
import java.util.concurrent.ThreadLocalRandom import java.util.concurrent.ThreadLocalRandom
import akka.util.ccompat.JavaConverters._
import scala.collection.immutable import scala.collection.immutable
import akka.actor.testkit.typed.internal.TestInboxImpl
import akka.actor.typed.ActorRef
import akka.annotation.DoNotInherit
import akka.util.ccompat.JavaConverters._
object TestInbox { object TestInbox {
import akka.actor.testkit.typed.scaladsl.TestInbox.address import akka.actor.testkit.typed.scaladsl.TestInbox.address

View file

@ -6,6 +6,11 @@ package akka.actor.testkit.typed.javadsl
import java.time.Duration import java.time.Duration
import com.typesafe.config.Config
import com.typesafe.config.ConfigFactory
import org.junit.Rule
import org.junit.rules.ExternalResource
import akka.actor.DeadLetter import akka.actor.DeadLetter
import akka.actor.Dropped import akka.actor.Dropped
import akka.actor.UnhandledMessage import akka.actor.UnhandledMessage
@ -17,10 +22,6 @@ import akka.actor.typed.Behavior
import akka.actor.typed.Props import akka.actor.typed.Props
import akka.actor.typed.Scheduler import akka.actor.typed.Scheduler
import akka.util.Timeout import akka.util.Timeout
import com.typesafe.config.Config
import com.typesafe.config.ConfigFactory
import org.junit.Rule
import org.junit.rules.ExternalResource
/** /**
* A Junit external resource for the [[ActorTestKit]], making it possible to have Junit manage the lifecycle of the testkit. * A Junit external resource for the [[ActorTestKit]], making it possible to have Junit manage the lifecycle of the testkit.

View file

@ -5,8 +5,8 @@
package akka.actor.testkit.typed.javadsl package akka.actor.testkit.typed.javadsl
import java.time.Duration import java.time.Duration
import java.util.function.Supplier
import java.util.{ List => JList } import java.util.{ List => JList }
import java.util.function.Supplier
import akka.actor.testkit.typed.FishingOutcome import akka.actor.testkit.typed.FishingOutcome
import akka.actor.testkit.typed.TestKitSettings import akka.actor.testkit.typed.TestKitSettings

View file

@ -6,6 +6,14 @@ package akka.actor.testkit.typed.scaladsl
import java.util.concurrent.TimeoutException import java.util.concurrent.TimeoutException
import scala.concurrent.Await
import scala.concurrent.duration._
import scala.reflect.ClassTag
import com.typesafe.config.Config
import com.typesafe.config.ConfigFactory
import org.slf4j.LoggerFactory
import akka.actor.DeadLetter import akka.actor.DeadLetter
import akka.actor.DeadLetterSuppression import akka.actor.DeadLetterSuppression
import akka.actor.Dropped import akka.actor.Dropped
@ -23,13 +31,6 @@ import akka.actor.typed.scaladsl.AskPattern._
import akka.actor.typed.scaladsl.adapter._ import akka.actor.typed.scaladsl.adapter._
import akka.annotation.InternalApi import akka.annotation.InternalApi
import akka.util.Timeout import akka.util.Timeout
import com.typesafe.config.Config
import com.typesafe.config.ConfigFactory
import org.slf4j.LoggerFactory
import scala.concurrent.Await
import scala.concurrent.duration._
import scala.reflect.ClassTag
object ActorTestKit { object ActorTestKit {

View file

@ -4,6 +4,9 @@
package akka.actor.testkit.typed.scaladsl package akka.actor.testkit.typed.scaladsl
import com.typesafe.config.Config
import com.typesafe.config.ConfigFactory
import akka.actor.DeadLetter import akka.actor.DeadLetter
import akka.actor.Dropped import akka.actor.Dropped
import akka.actor.UnhandledMessage import akka.actor.UnhandledMessage
@ -14,8 +17,6 @@ import akka.actor.typed.ActorSystem
import akka.actor.typed.Behavior import akka.actor.typed.Behavior
import akka.actor.typed.Props import akka.actor.typed.Props
import akka.util.Timeout import akka.util.Timeout
import com.typesafe.config.Config
import com.typesafe.config.ConfigFactory
object ActorTestKitBase { object ActorTestKitBase {
def testNameFromCallStack(): String = TestKitUtils.testNameFromCallStack(classOf[ActorTestKitBase]) def testNameFromCallStack(): String = TestKitUtils.testNameFromCallStack(classOf[ActorTestKitBase])

View file

@ -4,15 +4,16 @@
package akka.actor.testkit.typed.scaladsl package akka.actor.testkit.typed.scaladsl
import akka.actor.testkit.typed.internal.BehaviorTestKitImpl
import akka.actor.testkit.typed.{ CapturedLogEvent, Effect }
import akka.actor.typed.{ ActorRef, Behavior, Signal, TypedActorContext }
import akka.annotation.{ ApiMayChange, DoNotInherit }
import java.util.concurrent.ThreadLocalRandom import java.util.concurrent.ThreadLocalRandom
import scala.collection.immutable import scala.collection.immutable
import scala.reflect.ClassTag import scala.reflect.ClassTag
import akka.actor.testkit.typed.{ CapturedLogEvent, Effect }
import akka.actor.testkit.typed.internal.BehaviorTestKitImpl
import akka.actor.typed.{ ActorRef, Behavior, Signal, TypedActorContext }
import akka.annotation.{ ApiMayChange, DoNotInherit }
@ApiMayChange @ApiMayChange
object BehaviorTestKit { object BehaviorTestKit {
import akka.actor.testkit.typed.scaladsl.TestInbox.address import akka.actor.testkit.typed.scaladsl.TestInbox.address

View file

@ -4,10 +4,10 @@
package akka.actor.testkit.typed.scaladsl package akka.actor.testkit.typed.scaladsl
import akka.actor.typed.{ ActorRef, Behavior, Props }
import scala.concurrent.duration.FiniteDuration import scala.concurrent.duration.FiniteDuration
import akka.actor.typed.{ ActorRef, Behavior, Props }
/** /**
* Factories for behavior effects for [[BehaviorTestKit]], each effect has a suitable equals and can be used to compare * Factories for behavior effects for [[BehaviorTestKit]], each effect has a suitable equals and can be used to compare
* actual effects to expected ones. * actual effects to expected ones.

View file

@ -6,12 +6,13 @@ package akka.actor.testkit.typed.scaladsl
import scala.util.control.NonFatal import scala.util.control.NonFatal
import akka.actor.testkit.typed.internal.CapturingAppender
import org.scalatest.BeforeAndAfterAll import org.scalatest.BeforeAndAfterAll
import org.scalatest.Outcome import org.scalatest.Outcome
import org.scalatest.TestSuite import org.scalatest.TestSuite
import org.slf4j.LoggerFactory import org.slf4j.LoggerFactory
import akka.actor.testkit.typed.internal.CapturingAppender
/** /**
* Mixin this trait to a ScalaTest test to make log lines appear only when the test failed. * Mixin this trait to a ScalaTest test to make log lines appear only when the test failed.
* *

View file

@ -6,11 +6,12 @@ package akka.actor.testkit.typed.scaladsl
import scala.reflect.ClassTag import scala.reflect.ClassTag
import org.slf4j.event.Level
import akka.actor.testkit.typed.LoggingEvent import akka.actor.testkit.typed.LoggingEvent
import akka.actor.testkit.typed.internal.LoggingTestKitImpl import akka.actor.testkit.typed.internal.LoggingTestKitImpl
import akka.actor.typed.ActorSystem import akka.actor.typed.ActorSystem
import akka.annotation.DoNotInherit import akka.annotation.DoNotInherit
import org.slf4j.event.Level
/** /**
* Facilities for verifying logs. * Facilities for verifying logs.

View file

@ -4,13 +4,14 @@
package akka.actor.testkit.typed.scaladsl package akka.actor.testkit.typed.scaladsl
import akka.actor.typed.ActorSystem
import akka.actor.typed.internal.adapter.SchedulerAdapter
import com.typesafe.config.{ Config, ConfigFactory }
import scala.annotation.varargs import scala.annotation.varargs
import scala.concurrent.duration.{ Duration, FiniteDuration } import scala.concurrent.duration.{ Duration, FiniteDuration }
import com.typesafe.config.{ Config, ConfigFactory }
import akka.actor.typed.ActorSystem
import akka.actor.typed.internal.adapter.SchedulerAdapter
/** /**
* Manual time allows you to do async tests while controlling the scheduler of the system. * Manual time allows you to do async tests while controlling the scheduler of the system.
* *

View file

@ -4,15 +4,16 @@
package akka.actor.testkit.typed.scaladsl package akka.actor.testkit.typed.scaladsl
import akka.actor.testkit.typed.TestKitSettings
import akka.actor.typed.ActorSystem
import com.typesafe.config.Config import com.typesafe.config.Config
import com.typesafe.config.ConfigFactory import com.typesafe.config.ConfigFactory
import org.scalatest.{ BeforeAndAfterAll, TestSuite } import org.scalatest.{ BeforeAndAfterAll, TestSuite }
import org.scalatest.concurrent.Eventually import org.scalatest.concurrent.Eventually
import org.scalatest.concurrent.ScalaFutures import org.scalatest.concurrent.ScalaFutures
import org.scalatest.time.Span
import org.scalatest.matchers.should.Matchers import org.scalatest.matchers.should.Matchers
import org.scalatest.time.Span
import akka.actor.testkit.typed.TestKitSettings
import akka.actor.typed.ActorSystem
/** /**
* A ScalaTest base class for the [[ActorTestKit]], making it possible to have ScalaTest manage the lifecycle of the testkit. * A ScalaTest base class for the [[ActorTestKit]], making it possible to have ScalaTest manage the lifecycle of the testkit.

View file

@ -4,8 +4,8 @@
package akka.actor.testkit.typed.scaladsl package akka.actor.testkit.typed.scaladsl
import akka.actor.typed.scaladsl.adapter._
import akka.actor.typed.ActorSystem import akka.actor.typed.ActorSystem
import akka.actor.typed.scaladsl.adapter._
import akka.serialization.SerializationExtension import akka.serialization.SerializationExtension
import akka.serialization.Serializers import akka.serialization.Serializers

View file

@ -4,14 +4,15 @@
package akka.actor.testkit.typed.scaladsl package akka.actor.testkit.typed.scaladsl
import akka.actor.{ Address, RootActorPath }
import akka.actor.typed.ActorRef
import akka.annotation.{ ApiMayChange, DoNotInherit }
import akka.actor.testkit.typed.internal.TestInboxImpl
import java.util.concurrent.ThreadLocalRandom import java.util.concurrent.ThreadLocalRandom
import scala.collection.immutable import scala.collection.immutable
import akka.actor.{ Address, RootActorPath }
import akka.actor.testkit.typed.internal.TestInboxImpl
import akka.actor.typed.ActorRef
import akka.annotation.{ ApiMayChange, DoNotInherit }
@ApiMayChange @ApiMayChange
object TestInbox { object TestInbox {
def apply[T](name: String = "inbox"): TestInbox[T] = { def apply[T](name: String = "inbox"): TestInbox[T] = {

View file

@ -7,6 +7,7 @@ package akka.actor.testkit.typed.scaladsl
import scala.collection.immutable import scala.collection.immutable
import scala.concurrent.duration._ import scala.concurrent.duration._
import scala.reflect.ClassTag import scala.reflect.ClassTag
import akka.actor.testkit.typed.FishingOutcome import akka.actor.testkit.typed.FishingOutcome
import akka.actor.testkit.typed.TestKitSettings import akka.actor.testkit.typed.TestKitSettings
import akka.actor.testkit.typed.internal.TestProbeImpl import akka.actor.testkit.typed.internal.TestProbeImpl

View file

@ -4,20 +4,21 @@
package akka.actor.testkit.typed.scaladsl package akka.actor.testkit.typed.scaladsl
import akka.Done
import akka.actor.Dropped
import akka.actor.UnhandledMessage
import akka.actor.typed.eventstream.EventStream
import akka.actor.testkit.typed.internal.ActorTestKitGuardian
import akka.actor.typed.ActorSystem
import scala.concurrent.Promise import scala.concurrent.Promise
import akka.actor.typed.scaladsl.Behaviors
import com.typesafe.config.ConfigFactory import com.typesafe.config.ConfigFactory
import org.scalatest.BeforeAndAfterAll import org.scalatest.BeforeAndAfterAll
import org.scalatest.matchers.should.Matchers import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.{ AnyWordSpec, AnyWordSpecLike } import org.scalatest.wordspec.{ AnyWordSpec, AnyWordSpecLike }
import akka.Done
import akka.actor.Dropped
import akka.actor.UnhandledMessage
import akka.actor.testkit.typed.internal.ActorTestKitGuardian
import akka.actor.typed.ActorSystem
import akka.actor.typed.eventstream.EventStream
import akka.actor.typed.scaladsl.Behaviors
class ActorTestKitSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing { class ActorTestKitSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing {
"the Scala testkit" should { "the Scala testkit" should {

View file

@ -4,19 +4,20 @@
package akka.actor.testkit.typed.scaladsl package akka.actor.testkit.typed.scaladsl
import scala.reflect.ClassTag
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
import org.slf4j.event.Level
import akka.Done import akka.Done
import akka.actor.Address import akka.actor.Address
import akka.actor.typed.scaladsl.Behaviors
import akka.actor.typed.{ ActorRef, Behavior, Props }
import akka.actor.testkit.typed.{ CapturedLogEvent, Effect } import akka.actor.testkit.typed.{ CapturedLogEvent, Effect }
import akka.actor.testkit.typed.Effect._ import akka.actor.testkit.typed.Effect._
import akka.actor.testkit.typed.scaladsl.BehaviorTestKitSpec.{ Child, Parent } import akka.actor.testkit.typed.scaladsl.BehaviorTestKitSpec.{ Child, Parent }
import akka.actor.testkit.typed.scaladsl.BehaviorTestKitSpec.Parent._ import akka.actor.testkit.typed.scaladsl.BehaviorTestKitSpec.Parent._
import akka.actor.typed.{ ActorRef, Behavior, Props }
import scala.reflect.ClassTag import akka.actor.typed.scaladsl.Behaviors
import org.slf4j.event.Level
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
object BehaviorTestKitSpec { object BehaviorTestKitSpec {
object Parent { object Parent {

View file

@ -4,9 +4,10 @@
package akka.actor.testkit.typed.scaladsl package akka.actor.testkit.typed.scaladsl
import akka.actor.testkit.typed.LoggingEvent
import org.slf4j.event.Level
import org.scalatest.wordspec.AnyWordSpecLike import org.scalatest.wordspec.AnyWordSpecLike
import org.slf4j.event.Level
import akka.actor.testkit.typed.LoggingEvent
class LoggingTestKitSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing { class LoggingTestKitSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing {

View file

@ -8,9 +8,10 @@ import java.util.concurrent.atomic.AtomicInteger
import scala.concurrent.Future import scala.concurrent.Future
import akka.actor.testkit.typed.TestException
import org.slf4j.LoggerFactory
import org.scalatest.wordspec.AnyWordSpecLike import org.scalatest.wordspec.AnyWordSpecLike
import org.slf4j.LoggerFactory
import akka.actor.testkit.typed.TestException
class TestAppenderSpec class TestAppenderSpec
extends ScalaTestWithActorTestKit( extends ScalaTestWithActorTestKit(

View file

@ -4,12 +4,13 @@
package akka.actor.testkit.typed.scaladsl package akka.actor.testkit.typed.scaladsl
import akka.actor.typed.scaladsl.Behaviors
import com.typesafe.config.ConfigFactory
import scala.concurrent.duration._ import scala.concurrent.duration._
import com.typesafe.config.ConfigFactory
import org.scalatest.wordspec.AnyWordSpecLike import org.scalatest.wordspec.AnyWordSpecLike
import akka.actor.typed.scaladsl.Behaviors
class TestProbeSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing { class TestProbeSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing {
import TestProbeSpec._ import TestProbeSpec._

View file

@ -4,10 +4,11 @@
package akka package akka
import akka.actor._
import org.scalatest.matchers.should.Matchers import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec import org.scalatest.wordspec.AnyWordSpec
import akka.actor._
/** /**
* A spec that verified that the AkkaException has at least a single argument constructor of type String. * A spec that verified that the AkkaException has at least a single argument constructor of type String.
* *

View file

@ -4,15 +4,16 @@
package akka.actor package akka.actor
import language.postfixOps import scala.concurrent.duration._
import language.postfixOps
import org.scalatest.BeforeAndAfterEach
import akka.ConfigurationException
import akka.routing._
import akka.testkit._ import akka.testkit._
import akka.testkit.DefaultTimeout import akka.testkit.DefaultTimeout
import akka.testkit.TestEvent._ import akka.testkit.TestEvent._
import scala.concurrent.duration._
import akka.routing._
import org.scalatest.BeforeAndAfterEach
import akka.ConfigurationException
object ActorConfigurationVerificationSpec { object ActorConfigurationVerificationSpec {

View file

@ -4,15 +4,16 @@
package akka.actor package akka.actor
import scala.concurrent.duration._
import scala.language.postfixOps import scala.language.postfixOps
import akka.testkit.{ AkkaSpec, ImplicitSender, PerformanceTest } import com.codahale.metrics.Histogram
import scala.concurrent.duration._
import akka.testkit.metrics._
import org.scalatest.BeforeAndAfterAll
import akka.testkit.metrics.HeapMemoryUsage
import com.codahale.metrics.{ Histogram }
import com.typesafe.config.ConfigFactory import com.typesafe.config.ConfigFactory
import org.scalatest.BeforeAndAfterAll
import akka.testkit.{ AkkaSpec, ImplicitSender, PerformanceTest }
import akka.testkit.metrics._
import akka.testkit.metrics.HeapMemoryUsage
object ActorCreationPerfSpec { object ActorCreationPerfSpec {

View file

@ -4,14 +4,16 @@
package akka.actor package akka.actor
import java.util.UUID.{ randomUUID => newUuid }
import java.util.concurrent.atomic._
import scala.concurrent.Await
import org.scalatest.BeforeAndAfterEach import org.scalatest.BeforeAndAfterEach
import akka.actor.Actor._ import akka.actor.Actor._
import akka.testkit._
import java.util.concurrent.atomic._
import scala.concurrent.Await
import akka.pattern.ask import akka.pattern.ask
import java.util.UUID.{ randomUUID => newUuid } import akka.testkit._
object ActorLifeCycleSpec { object ActorLifeCycleSpec {

View file

@ -4,13 +4,14 @@
package akka.actor package akka.actor
import com.typesafe.config.ConfigFactory
import akka.testkit._
import akka.dispatch._
import scala.concurrent.duration.{ Duration, FiniteDuration } import scala.concurrent.duration.{ Duration, FiniteDuration }
import akka.ConfigurationException
import com.typesafe.config.Config import com.typesafe.config.Config
import com.typesafe.config.ConfigFactory
import akka.ConfigurationException
import akka.dispatch._
import akka.testkit._
import akka.util.Helpers.ConfigOps import akka.util.Helpers.ConfigOps
import akka.util.unused import akka.util.unused

View file

@ -4,16 +4,18 @@
package akka.actor package akka.actor
import java.lang.IllegalStateException
import scala.concurrent.Await
import scala.concurrent.Promise
import scala.concurrent.duration._
import language.postfixOps import language.postfixOps
import akka.testkit._
import akka.util.Timeout
import scala.concurrent.duration._
import scala.concurrent.Await
import java.lang.IllegalStateException
import scala.concurrent.Promise
import akka.pattern.ask import akka.pattern.ask
import akka.serialization.JavaSerializer import akka.serialization.JavaSerializer
import akka.testkit._
import akka.util.Timeout
object ActorRefSpec { object ActorRefSpec {

View file

@ -4,10 +4,11 @@
package akka.actor package akka.actor
import akka.testkit._
import scala.concurrent.duration._
import scala.concurrent.Await import scala.concurrent.Await
import scala.concurrent.duration._
import akka.pattern.ask import akka.pattern.ask
import akka.testkit._
object ActorSelectionSpec { object ActorSelectionSpec {

View file

@ -4,14 +4,15 @@
package akka.actor package akka.actor
import scala.concurrent.ExecutionContext
import scala.concurrent.duration._
import com.typesafe.config.ConfigFactory
import akka.ConfigurationException import akka.ConfigurationException
import akka.actor.setup.ActorSystemSetup import akka.actor.setup.ActorSystemSetup
import akka.dispatch.{ Dispatchers, ExecutionContexts } import akka.dispatch.{ Dispatchers, ExecutionContexts }
import akka.testkit.{ AkkaSpec, ImplicitSender, TestActors, TestProbe } import akka.testkit.{ AkkaSpec, ImplicitSender, TestActors, TestProbe }
import com.typesafe.config.ConfigFactory
import scala.concurrent.ExecutionContext
import scala.concurrent.duration._
object ActorSystemDispatchersSpec { object ActorSystemDispatchersSpec {

View file

@ -4,22 +4,23 @@
package akka.actor package akka.actor
import java.util.concurrent.atomic.AtomicInteger
import java.util.concurrent.{ ConcurrentLinkedQueue, RejectedExecutionException } import java.util.concurrent.{ ConcurrentLinkedQueue, RejectedExecutionException }
import java.util.concurrent.atomic.AtomicInteger
import scala.concurrent.{ Await, Future }
import scala.concurrent.duration._
import scala.language.postfixOps
import com.github.ghik.silencer.silent
import com.typesafe.config.{ Config, ConfigFactory }
import akka.actor.setup.ActorSystemSetup import akka.actor.setup.ActorSystemSetup
import akka.dispatch._ import akka.dispatch._
import akka.japi.Util.immutableSeq import akka.japi.Util.immutableSeq
import akka.pattern.ask import akka.pattern.ask
import akka.testkit.{ TestKit, _ } import akka.testkit.{ TestKit, _ }
import akka.util.Helpers.ConfigOps
import akka.util.{ Switch, Timeout } import akka.util.{ Switch, Timeout }
import com.github.ghik.silencer.silent import akka.util.Helpers.ConfigOps
import com.typesafe.config.{ Config, ConfigFactory }
import scala.concurrent.duration._
import scala.concurrent.{ Await, Future }
import scala.language.postfixOps
object ActorSystemSpec { object ActorSystemSpec {

View file

@ -4,12 +4,13 @@
package akka.actor package akka.actor
import scala.concurrent.Await
import scala.concurrent.duration._ import scala.concurrent.duration._
import akka.pattern.{ ask, AskTimeoutException }
import akka.testkit._ import akka.testkit._
import akka.testkit.TestEvent._ import akka.testkit.TestEvent._
import scala.concurrent.Await
import akka.util.Timeout import akka.util.Timeout
import akka.pattern.{ ask, AskTimeoutException }
class ActorTimeoutSpec extends AkkaSpec { class ActorTimeoutSpec extends AkkaSpec {

View file

@ -4,17 +4,18 @@
package akka.actor package akka.actor
import scala.concurrent.duration._
import com.typesafe.config.{ Config, ConfigFactory }
import language.postfixOps import language.postfixOps
import org.scalatest.BeforeAndAfterEach
import akka.actor.ActorSystem.Settings
import akka.dispatch.BoundedDequeBasedMailbox
import akka.testkit._ import akka.testkit._
import akka.testkit.DefaultTimeout import akka.testkit.DefaultTimeout
import akka.testkit.TestEvent._ import akka.testkit.TestEvent._
import akka.dispatch.BoundedDequeBasedMailbox
import scala.concurrent.duration._
import akka.actor.ActorSystem.Settings
import akka.util.unused import akka.util.unused
import com.typesafe.config.{ Config, ConfigFactory }
import org.scalatest.BeforeAndAfterEach
object ActorWithBoundedStashSpec { object ActorWithBoundedStashSpec {

View file

@ -4,19 +4,19 @@
package akka.actor package akka.actor
import scala.concurrent.Await
import scala.concurrent.duration._
import com.github.ghik.silencer.silent
import language.postfixOps import language.postfixOps
import org.scalatest.BeforeAndAfterEach
import org.scalatestplus.junit.JUnitSuiteLike
import akka.pattern.ask
import akka.testkit._ import akka.testkit._
import akka.testkit.DefaultTimeout import akka.testkit.DefaultTimeout
import akka.testkit.TestEvent._ import akka.testkit.TestEvent._
import scala.concurrent.Await
import akka.pattern.ask
import com.github.ghik.silencer.silent
import scala.concurrent.duration._
import org.scalatest.BeforeAndAfterEach
import org.scalatestplus.junit.JUnitSuiteLike
object ActorWithStashSpec { object ActorWithStashSpec {
class StashingActor extends Actor with Stash { class StashingActor extends Actor with Stash {

View file

@ -4,11 +4,12 @@
package akka.actor package akka.actor
import scala.concurrent.duration._
import language.postfixOps import language.postfixOps
import akka.dispatch.ThreadPoolConfig
import akka.testkit.AkkaSpec import akka.testkit.AkkaSpec
import akka.dispatch.{ ThreadPoolConfig }
import scala.concurrent.duration._
object ConsistencySpec { object ConsistencySpec {
val minThreads = 1 val minThreads = 1

View file

@ -5,19 +5,20 @@
package akka.actor package akka.actor
import java.util import java.util
import scala.concurrent.duration._
import scala.concurrent.{ Await, ExecutionContext, Future, Promise }
import akka.Done
import akka.testkit.{ AkkaSpec, EventFilter, TestKit, TestProbe }
import com.typesafe.config.{ Config, ConfigFactory }
import akka.actor.CoordinatedShutdown.Phase
import akka.actor.CoordinatedShutdown.UnknownReason
import akka.util.ccompat.JavaConverters._
import java.util.concurrent.{ Executors, TimeoutException } import java.util.concurrent.{ Executors, TimeoutException }
import scala.concurrent.{ Await, ExecutionContext, Future, Promise }
import scala.concurrent.duration._
import com.typesafe.config.{ Config, ConfigFactory }
import akka.ConfigurationException import akka.ConfigurationException
import akka.Done
import akka.actor.CoordinatedShutdown.Phase
import akka.actor.CoordinatedShutdown.UnknownReason
import akka.dispatch.ExecutionContexts import akka.dispatch.ExecutionContexts
import akka.testkit.{ AkkaSpec, EventFilter, TestKit, TestProbe }
import akka.util.ccompat.JavaConverters._
class CoordinatedShutdownSpec class CoordinatedShutdownSpec
extends AkkaSpec(ConfigFactory.parseString(""" extends AkkaSpec(ConfigFactory.parseString("""

View file

@ -4,14 +4,14 @@
package akka.actor package akka.actor
import scala.concurrent.duration._
import akka.event.Logging import akka.event.Logging
import akka.testkit.AkkaSpec import akka.testkit.AkkaSpec
import akka.testkit.ImplicitSender import akka.testkit.ImplicitSender
import akka.testkit.TestActors import akka.testkit.TestActors
import akka.testkit.TestProbe import akka.testkit.TestProbe
import scala.concurrent.duration._
object DeadLetterSupressionSpec { object DeadLetterSupressionSpec {
case object NormalMsg case object NormalMsg

View file

@ -4,16 +4,16 @@
package akka.actor package akka.actor
import akka.actor.Props.EmptyActor import scala.concurrent.Await
import scala.concurrent.duration._
import com.github.ghik.silencer.silent
import language.postfixOps import language.postfixOps
import akka.actor.Props.EmptyActor
import akka.dispatch.sysmsg.{ DeathWatchNotification, Failed } import akka.dispatch.sysmsg.{ DeathWatchNotification, Failed }
import akka.pattern.ask import akka.pattern.ask
import akka.testkit._ import akka.testkit._
import com.github.ghik.silencer.silent
import scala.concurrent.duration._
import scala.concurrent.Await
class LocalDeathWatchSpec extends AkkaSpec with ImplicitSender with DefaultTimeout with DeathWatchSpec class LocalDeathWatchSpec extends AkkaSpec with ImplicitSender with DefaultTimeout with DeathWatchSpec

View file

@ -4,13 +4,14 @@
package akka.actor package akka.actor
import language.postfixOps import scala.concurrent.duration._
import akka.testkit.AkkaSpec
import com.typesafe.config.ConfigFactory import com.typesafe.config.ConfigFactory
import com.typesafe.config.ConfigParseOptions import com.typesafe.config.ConfigParseOptions
import language.postfixOps
import akka.routing._ import akka.routing._
import scala.concurrent.duration._ import akka.testkit.AkkaSpec
object DeployerSpec { object DeployerSpec {
val deployerConf = ConfigFactory.parseString( val deployerConf = ConfigFactory.parseString(

View file

@ -4,15 +4,15 @@
package akka.actor package akka.actor
import org.scalatest.BeforeAndAfterAll
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
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.{ Failure, Success, Try } import scala.util.{ Failure, Success, Try }
import org.scalatest.BeforeAndAfterAll
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
abstract class TestSuperclass { abstract class TestSuperclass {
def name: String def name: String
} }

View file

@ -6,15 +6,16 @@ package akka.actor
import java.util.concurrent.atomic.AtomicInteger import java.util.concurrent.atomic.AtomicInteger
import akka.testkit.EventFilter
import akka.testkit.TestKit._
import com.typesafe.config.ConfigFactory
import scala.util.control.NoStackTrace import scala.util.control.NoStackTrace
import com.github.ghik.silencer.silent import com.github.ghik.silencer.silent
import com.typesafe.config.ConfigFactory
import org.scalatest.matchers.should.Matchers import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec import org.scalatest.wordspec.AnyWordSpec
import org.scalatestplus.junit.JUnitSuiteLike import org.scalatestplus.junit.JUnitSuiteLike
import akka.testkit.EventFilter
import akka.testkit.TestKit._
@silent @silent
class JavaExtensionSpec extends JavaExtension with JUnitSuiteLike class JavaExtensionSpec extends JavaExtension with JUnitSuiteLike

View file

@ -4,14 +4,14 @@
package akka.actor package akka.actor
import language.postfixOps
import akka.testkit._
import scala.concurrent.duration._
import akka.event._
import com.typesafe.config.ConfigFactory
import scala.concurrent.Await import scala.concurrent.Await
import scala.concurrent.duration._
import com.typesafe.config.ConfigFactory
import language.postfixOps
import akka.event._
import akka.testkit._
import akka.util.{ unused, Timeout } import akka.util.{ unused, Timeout }
object FSMActorSpec { object FSMActorSpec {

View file

@ -4,11 +4,11 @@
package akka.actor package akka.actor
import akka.testkit._
import scala.concurrent.duration._ import scala.concurrent.duration._
import scala.language.postfixOps import scala.language.postfixOps
import akka.testkit._
object FSMTransitionSpec { object FSMTransitionSpec {
class Supervisor extends Actor { class Supervisor extends Actor {

View file

@ -4,12 +4,13 @@
package akka.actor package akka.actor
import scala.concurrent.ExecutionContextExecutor
import scala.concurrent.duration._
import language.postfixOps import language.postfixOps
import akka.testkit._
import scala.concurrent.duration._
import akka.pattern.{ ask, pipe } import akka.pattern.{ ask, pipe }
import scala.concurrent.ExecutionContextExecutor import akka.testkit._
object ForwardActorSpec { object ForwardActorSpec {
val ExpectedMessage = "FOO" val ExpectedMessage = "FOO"

View file

@ -4,10 +4,10 @@
package akka.actor package akka.actor
import akka.testkit.AkkaSpec
import akka.testkit.ImplicitSender
import akka.testkit.EventFilter
import akka.actor.dungeon.SerializationCheckFailedException import akka.actor.dungeon.SerializationCheckFailedException
import akka.testkit.AkkaSpec
import akka.testkit.EventFilter
import akka.testkit.ImplicitSender
object FunctionRefSpec { object FunctionRefSpec {

View file

@ -4,17 +4,17 @@
package akka.actor package akka.actor
import language.postfixOps
import akka.testkit._
import scala.concurrent.Await import scala.concurrent.Await
import scala.concurrent.duration._
import akka.util.Timeout
import com.github.ghik.silencer.silent
import scala.concurrent.Future import scala.concurrent.Future
import scala.util.Success import scala.concurrent.duration._
import scala.util.Failure import scala.util.Failure
import scala.util.Success
import com.github.ghik.silencer.silent
import language.postfixOps
import akka.testkit._
import akka.util.Timeout
object LocalActorRefProviderSpec { object LocalActorRefProviderSpec {
val config = """ val config = """

View file

@ -4,9 +4,10 @@
package akka.actor package akka.actor
import com.github.ghik.silencer.silent
import akka.testkit.AkkaSpec import akka.testkit.AkkaSpec
import akka.util.unused import akka.util.unused
import com.github.ghik.silencer.silent
object PropsCreationSpec { object PropsCreationSpec {

View file

@ -4,11 +4,12 @@
package akka.actor package akka.actor
import com.typesafe.config.ConfigFactory
import akka.actor.ActorSystem.Settings import akka.actor.ActorSystem.Settings
import akka.actor.ActorSystem.findClassLoader import akka.actor.ActorSystem.findClassLoader
import akka.actor.setup.ActorSystemSetup import akka.actor.setup.ActorSystemSetup
import akka.testkit.AbstractSpec import akka.testkit.AbstractSpec
import com.typesafe.config.ConfigFactory
class ProviderSelectionSpec extends AbstractSpec { class ProviderSelectionSpec extends AbstractSpec {
import ProviderSelection.{ ClusterActorRefProvider, RemoteActorRefProvider } import ProviderSelection.{ ClusterActorRefProvider, RemoteActorRefProvider }

View file

@ -4,15 +4,16 @@
package akka.actor package akka.actor
import language.postfixOps import java.util.concurrent.TimeoutException
import akka.testkit._ import java.util.concurrent.atomic.AtomicBoolean
import scala.concurrent.duration._
import java.util.concurrent.atomic.AtomicInteger import java.util.concurrent.atomic.AtomicInteger
import scala.concurrent.Await import scala.concurrent.Await
import java.util.concurrent.TimeoutException import scala.concurrent.duration._
import java.util.concurrent.atomic.AtomicBoolean
import language.postfixOps
import akka.testkit._
object ReceiveTimeoutSpec { object ReceiveTimeoutSpec {
case object Tick case object Tick

View file

@ -5,7 +5,9 @@
package akka.actor package akka.actor
import java.net.URLEncoder import java.net.URLEncoder
import scala.collection.immutable import scala.collection.immutable
import org.scalatest.matchers.should.Matchers import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec import org.scalatest.wordspec.AnyWordSpec

View file

@ -4,20 +4,21 @@
package akka.actor package akka.actor
import language.postfixOps
import java.lang.Thread.sleep import java.lang.Thread.sleep
import scala.concurrent.Await import scala.concurrent.Await
import akka.testkit.TestEvent._ import scala.concurrent.duration._
import akka.testkit.EventFilter
import com.github.ghik.silencer.silent
import language.postfixOps
import akka.pattern.ask
import akka.testkit.AkkaSpec import akka.testkit.AkkaSpec
import akka.testkit.DefaultTimeout import akka.testkit.DefaultTimeout
import akka.testkit.EventFilter
import akka.testkit.TestEvent._
import akka.testkit.TestLatch import akka.testkit.TestLatch
import scala.concurrent.duration._
import akka.pattern.ask
import com.github.ghik.silencer.silent
@silent @silent
class RestartStrategySpec extends AkkaSpec with DefaultTimeout { class RestartStrategySpec extends AkkaSpec with DefaultTimeout {

View file

@ -4,24 +4,24 @@
package akka.actor package akka.actor
import language.postfixOps
import java.io.Closeable import java.io.Closeable
import java.util.concurrent._ import java.util.concurrent._
import atomic.{ AtomicInteger, AtomicReference } import java.util.concurrent.ThreadLocalRandom
import scala.concurrent.{ Await, ExecutionContext, Future } import scala.concurrent.{ Await, ExecutionContext, Future }
import scala.concurrent.duration._ import scala.concurrent.duration._
import java.util.concurrent.ThreadLocalRandom
import scala.util.Try import scala.util.Try
import scala.util.control.NoStackTrace
import scala.util.control.NonFatal import scala.util.control.NonFatal
import org.scalatest.BeforeAndAfterEach
import atomic.{ AtomicInteger, AtomicReference }
import com.github.ghik.silencer.silent
import com.typesafe.config.{ Config, ConfigFactory } import com.typesafe.config.{ Config, ConfigFactory }
import language.postfixOps
import org.scalatest.BeforeAndAfterEach
import akka.pattern.ask import akka.pattern.ask
import akka.testkit._ import akka.testkit._
import com.github.ghik.silencer.silent
import scala.util.control.NoStackTrace
object SchedulerSpec { object SchedulerSpec {
val testConfRevolver = val testConfRevolver =

View file

@ -4,31 +4,31 @@
package akka.actor package akka.actor
import language.postfixOps import java.lang.System.identityHashCode
import java.lang.ref.WeakReference
import java.util.concurrent.{ CountDownLatch, TimeUnit } import java.util.concurrent.{ CountDownLatch, TimeUnit }
import java.util.concurrent.ConcurrentHashMap
import java.util.concurrent.atomic.AtomicInteger
import scala.concurrent.Await import scala.concurrent.Await
import scala.concurrent.duration._ import scala.concurrent.duration._
import scala.util.Random import scala.util.Random
import scala.util.control.NoStackTrace import scala.util.control.NoStackTrace
import com.typesafe.config.{ Config, ConfigFactory }
import SupervisorStrategy.{ Directive, Restart, Resume, Stop } import SupervisorStrategy.{ Directive, Restart, Resume, Stop }
import com.github.ghik.silencer.silent
import com.typesafe.config.{ Config, ConfigFactory }
import language.postfixOps
import akka.actor.SupervisorStrategy.seqThrowable2Decider import akka.actor.SupervisorStrategy.seqThrowable2Decider
import akka.dispatch.{ Dispatcher, DispatcherConfigurator, DispatcherPrerequisites, MessageDispatcher } import akka.dispatch.{ Dispatcher, DispatcherConfigurator, DispatcherPrerequisites, MessageDispatcher }
import akka.event.Logging
import akka.pattern.ask import akka.pattern.ask
import akka.testkit.{ AkkaSpec, DefaultTimeout, EventFilter, ImplicitSender } import akka.testkit.{ AkkaSpec, DefaultTimeout, EventFilter, ImplicitSender }
import akka.testkit.{ filterEvents, filterException, TestDuration, TestLatch } import akka.testkit.{ filterEvents, filterException, TestDuration, TestLatch }
import akka.testkit.TestEvent.Mute
import java.util.concurrent.ConcurrentHashMap
import java.lang.ref.WeakReference
import akka.event.Logging
import java.util.concurrent.atomic.AtomicInteger
import java.lang.System.identityHashCode
import akka.util.Helpers.ConfigOps
import akka.testkit.LongRunningTest import akka.testkit.LongRunningTest
import com.github.ghik.silencer.silent import akka.testkit.TestEvent.Mute
import akka.util.Helpers.ConfigOps
object SupervisorHierarchySpec { object SupervisorHierarchySpec {

View file

@ -4,20 +4,20 @@
package akka.actor package akka.actor
import language.postfixOps
import akka.testkit.{ filterEvents, EventFilter }
import scala.concurrent.Await
import java.util.concurrent.{ CountDownLatch, TimeUnit } import java.util.concurrent.{ CountDownLatch, TimeUnit }
import akka.testkit.AkkaSpec import scala.concurrent.Await
import akka.testkit.DefaultTimeout
import akka.pattern.ask
import com.github.ghik.silencer.silent
import scala.concurrent.duration._ import scala.concurrent.duration._
import scala.util.control.NonFatal import scala.util.control.NonFatal
import com.github.ghik.silencer.silent
import language.postfixOps
import akka.pattern.ask
import akka.testkit.{ filterEvents, EventFilter }
import akka.testkit.AkkaSpec
import akka.testkit.DefaultTimeout
object SupervisorMiscSpec { object SupervisorMiscSpec {
val config = """ val config = """
pinned-dispatcher { pinned-dispatcher {

View file

@ -4,23 +4,24 @@
package akka.actor package akka.actor
import language.postfixOps
import org.scalatest.BeforeAndAfterEach
import scala.concurrent.duration._
import akka.{ Die, Ping }
import akka.testkit.TestEvent._
import akka.testkit._
import java.util.concurrent.atomic.AtomicInteger import java.util.concurrent.atomic.AtomicInteger
import scala.concurrent.Await import scala.concurrent.Await
import akka.pattern.ask import scala.concurrent.duration._
import com.typesafe.config.Config
import com.typesafe.config.ConfigFactory import com.typesafe.config.ConfigFactory
import language.postfixOps
import org.scalatest.BeforeAndAfterEach
import akka.{ Die, Ping }
import akka.ConfigurationException
import akka.dispatch.MailboxType import akka.dispatch.MailboxType
import akka.dispatch.MessageQueue import akka.dispatch.MessageQueue
import com.typesafe.config.Config import akka.pattern.ask
import akka.ConfigurationException
import akka.routing.RoundRobinPool import akka.routing.RoundRobinPool
import akka.testkit._
import akka.testkit.TestEvent._
import akka.util.unused import akka.util.unused
object SupervisorSpec { object SupervisorSpec {

View file

@ -4,12 +4,13 @@
package akka.actor package akka.actor
import language.postfixOps
import scala.concurrent.Await import scala.concurrent.Await
import scala.concurrent.duration._ import scala.concurrent.duration._
import akka.testkit.{ AkkaSpec, DefaultTimeout, EventFilter, ImplicitSender }
import language.postfixOps
import akka.pattern.ask import akka.pattern.ask
import akka.testkit.{ AkkaSpec, DefaultTimeout, EventFilter, ImplicitSender }
class SupervisorTreeSpec extends AkkaSpec with ImplicitSender with DefaultTimeout { class SupervisorTreeSpec extends AkkaSpec with ImplicitSender with DefaultTimeout {

View file

@ -4,16 +4,17 @@
package akka.actor package akka.actor
import language.postfixOps import scala.concurrent.Await
import scala.concurrent.duration._
import language.postfixOps
import org.scalatest.BeforeAndAfterAll import org.scalatest.BeforeAndAfterAll
import akka.pattern.ask
import akka.testkit.{ filterEvents, EventFilter } import akka.testkit.{ filterEvents, EventFilter }
import akka.testkit.AkkaSpec import akka.testkit.AkkaSpec
import akka.testkit.ImplicitSender
import akka.testkit.DefaultTimeout import akka.testkit.DefaultTimeout
import scala.concurrent.Await import akka.testkit.ImplicitSender
import akka.pattern.ask
import scala.concurrent.duration._
class Ticket669Spec extends AkkaSpec with BeforeAndAfterAll with ImplicitSender with DefaultTimeout { class Ticket669Spec extends AkkaSpec with BeforeAndAfterAll with ImplicitSender with DefaultTimeout {
import Ticket669Spec._ import Ticket669Spec._

View file

@ -6,10 +6,11 @@ package akka.actor
import java.util.concurrent.atomic.AtomicInteger import java.util.concurrent.atomic.AtomicInteger
import scala.concurrent.Await
import scala.concurrent.duration._ import scala.concurrent.duration._
import scala.util.control.NoStackTrace import scala.util.control.NoStackTrace
import akka.testkit._ import akka.testkit._
import scala.concurrent.Await
object TimerSpec { object TimerSpec {
sealed trait Command sealed trait Command

View file

@ -4,8 +4,17 @@
package akka.actor package akka.actor
import java.util.concurrent.atomic.AtomicReference
import java.util.concurrent.{ CountDownLatch, TimeUnit, TimeoutException } import java.util.concurrent.{ CountDownLatch, TimeUnit, TimeoutException }
import java.util.concurrent.atomic.AtomicReference
import scala.annotation.tailrec
import scala.collection.immutable
import scala.concurrent.{ Await, Future }
import scala.concurrent.duration._
import scala.language.postfixOps
import com.github.ghik.silencer.silent
import org.scalatest.{ BeforeAndAfterAll, BeforeAndAfterEach }
import akka.actor.TypedActor._ import akka.actor.TypedActor._
import akka.japi.{ Option => JOption } import akka.japi.{ Option => JOption }
@ -14,14 +23,6 @@ import akka.routing.RoundRobinGroup
import akka.serialization.{ JavaSerializer, SerializerWithStringManifest } import akka.serialization.{ JavaSerializer, SerializerWithStringManifest }
import akka.testkit.{ filterEvents, AkkaSpec, DefaultTimeout, EventFilter, TimingTest } import akka.testkit.{ filterEvents, AkkaSpec, DefaultTimeout, EventFilter, TimingTest }
import akka.util.Timeout import akka.util.Timeout
import com.github.ghik.silencer.silent
import org.scalatest.{ BeforeAndAfterAll, BeforeAndAfterEach }
import scala.annotation.tailrec
import scala.collection.immutable
import scala.concurrent.duration._
import scala.concurrent.{ Await, Future }
import scala.language.postfixOps
object TypedActorSpec { object TypedActorSpec {

View file

@ -4,11 +4,12 @@
package akka.actor package akka.actor
import akka.testkit.{ AkkaSpec, TestProbe } import scala.util.control.NoStackTrace
import akka.actor.SupervisorStrategy.{ Restart, Stop } import akka.actor.SupervisorStrategy.{ Restart, Stop }
import akka.dispatch.sysmsg.SystemMessage import akka.dispatch.sysmsg.SystemMessage
import akka.event.EventStream import akka.event.EventStream
import scala.util.control.NoStackTrace import akka.testkit.{ AkkaSpec, TestProbe }
object UidClashTest { object UidClashTest {

View file

@ -4,25 +4,26 @@
package akka.actor.dispatch package akka.actor.dispatch
import language.postfixOps
import java.rmi.RemoteException import java.rmi.RemoteException
import java.util.concurrent.{ ConcurrentHashMap, CountDownLatch, TimeUnit } import java.util.concurrent.{ ConcurrentHashMap, CountDownLatch, TimeUnit }
import java.util.concurrent.atomic.{ AtomicInteger, AtomicLong } import java.util.concurrent.atomic.{ AtomicInteger, AtomicLong }
import org.scalatest.Assertions._ import scala.annotation.tailrec
import scala.concurrent.{ Await, Future }
import scala.concurrent.duration._
import com.github.ghik.silencer.silent
import com.typesafe.config.Config import com.typesafe.config.Config
import language.postfixOps
import org.scalatest.Assertions._
import akka.actor._ import akka.actor._
import akka.dispatch.sysmsg.SystemMessageList
import akka.dispatch._ import akka.dispatch._
import akka.dispatch.sysmsg.SystemMessageList
import akka.event.Logging.Error import akka.event.Logging.Error
import akka.pattern.ask import akka.pattern.ask
import akka.testkit._ import akka.testkit._
import akka.util.Switch import akka.util.Switch
import com.github.ghik.silencer.silent
import scala.concurrent.duration._
import scala.concurrent.{ Await, Future }
import scala.annotation.tailrec
object ActorModelSpec { object ActorModelSpec {

View file

@ -4,16 +4,18 @@
package akka.actor.dispatch package akka.actor.dispatch
import language.postfixOps
import java.util.concurrent.{ CountDownLatch, TimeUnit } import java.util.concurrent.{ CountDownLatch, TimeUnit }
import java.util.concurrent.atomic.AtomicBoolean import java.util.concurrent.atomic.AtomicBoolean
import akka.testkit.AkkaSpec
import akka.actor.{ Actor, Props }
import scala.concurrent.Await import scala.concurrent.Await
import scala.concurrent.duration._ import scala.concurrent.duration._
import akka.testkit.DefaultTimeout
import language.postfixOps
import akka.actor.{ Actor, Props }
import akka.pattern.ask import akka.pattern.ask
import akka.testkit.AkkaSpec
import akka.testkit.DefaultTimeout
object DispatcherActorSpec { object DispatcherActorSpec {
val config = """ val config = """

View file

@ -5,6 +5,7 @@
package akka.actor.dispatch package akka.actor.dispatch
import java.util.concurrent.CountDownLatch import java.util.concurrent.CountDownLatch
import akka.actor._ import akka.actor._
import akka.testkit.AkkaSpec import akka.testkit.AkkaSpec

View file

@ -4,17 +4,19 @@
package akka.actor.dispatch package akka.actor.dispatch
import scala.reflect.ClassTag
import com.typesafe.config.Config
import com.typesafe.config.ConfigFactory
import akka.ConfigurationException
import akka.actor._
import akka.dispatch._
import akka.testkit.{ AkkaSpec, ImplicitSender }
import akka.routing.FromConfig
import java.util.concurrent.ConcurrentLinkedQueue import java.util.concurrent.ConcurrentLinkedQueue
import java.util.concurrent.atomic.AtomicBoolean import java.util.concurrent.atomic.AtomicBoolean
import scala.reflect.ClassTag
import com.typesafe.config.Config
import com.typesafe.config.ConfigFactory
import akka.ConfigurationException
import akka.actor._
import akka.dispatch._
import akka.routing.FromConfig
import akka.testkit.{ AkkaSpec, ImplicitSender }
import akka.util.unused import akka.util.unused
object DispatchersSpec { object DispatchersSpec {

View file

@ -6,12 +6,14 @@ package akka.actor.dispatch
import java.util.concurrent.{ CountDownLatch, TimeUnit } import java.util.concurrent.{ CountDownLatch, TimeUnit }
import akka.testkit._
import akka.actor.{ Actor, Props }
import akka.testkit.AkkaSpec
import org.scalatest.BeforeAndAfterEach
import scala.concurrent.Await import scala.concurrent.Await
import org.scalatest.BeforeAndAfterEach
import akka.actor.{ Actor, Props }
import akka.pattern.ask import akka.pattern.ask
import akka.testkit._
import akka.testkit.AkkaSpec
object PinnedActorSpec { object PinnedActorSpec {
val config = """ val config = """

View file

@ -6,7 +6,6 @@ package akka.actor.dungeon
import akka.actor.Actor import akka.actor.Actor
import akka.actor.Props import akka.actor.Props
import akka.testkit._ import akka.testkit._
object DispatchSpec { object DispatchSpec {

View file

@ -4,11 +4,13 @@
package akka.actor.routing package akka.actor.routing
import akka.testkit._ import java.util.concurrent.atomic.AtomicInteger
import scala.concurrent.Await
import akka.actor._ import akka.actor._
import akka.routing._ import akka.routing._
import java.util.concurrent.atomic.AtomicInteger import akka.testkit._
import scala.concurrent.Await
class ListenerSpec extends AkkaSpec { class ListenerSpec extends AkkaSpec {

View file

@ -4,11 +4,12 @@
package akka.actor.setup package akka.actor.setup
import akka.actor.ActorSystem
import akka.testkit.TestKit
import org.scalatest.matchers.should.Matchers import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec import org.scalatest.wordspec.AnyWordSpec
import akka.actor.ActorSystem
import akka.testkit.TestKit
case class DummySetup(name: String) extends Setup case class DummySetup(name: String) extends Setup
case class DummySetup2(name: String) extends Setup case class DummySetup2(name: String) extends Setup
case class DummySetup3(name: String) extends Setup case class DummySetup3(name: String) extends Setup

View file

@ -6,15 +6,16 @@ package akka.config
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
import scala.concurrent.duration._
import com.typesafe.config.ConfigFactory
import org.scalatest.Assertions
import akka.actor.ActorSystem import akka.actor.ActorSystem
import akka.actor.ExtendedActorSystem
import akka.event.DefaultLoggingFilter import akka.event.DefaultLoggingFilter
import akka.event.Logging.DefaultLogger import akka.event.Logging.DefaultLogger
import akka.testkit.AkkaSpec import akka.testkit.AkkaSpec
import com.typesafe.config.ConfigFactory
import org.scalatest.Assertions
import scala.concurrent.duration._
import akka.actor.ExtendedActorSystem
class ConfigSpec extends AkkaSpec(ConfigFactory.defaultReference(ActorSystem.findClassLoader())) with Assertions { class ConfigSpec extends AkkaSpec(ConfigFactory.defaultReference(ActorSystem.findClassLoader())) with Assertions {

View file

@ -4,17 +4,18 @@
package akka.dataflow package akka.dataflow
import scala.concurrent.Await
import scala.concurrent.ExecutionContextExecutor
import scala.concurrent.ExecutionException
import scala.concurrent.Future
import scala.concurrent.duration._
import language.postfixOps import language.postfixOps
import akka.actor.{ Actor, Props } import akka.actor.{ Actor, Props }
import akka.actor.ActorRef import akka.actor.ActorRef
import scala.concurrent.Future
import scala.concurrent.Await
import scala.concurrent.duration._
import akka.testkit.{ AkkaSpec, DefaultTimeout }
import akka.pattern.{ ask, pipe } import akka.pattern.{ ask, pipe }
import scala.concurrent.ExecutionException import akka.testkit.{ AkkaSpec, DefaultTimeout }
import scala.concurrent.ExecutionContextExecutor
class Future2ActorSpec extends AkkaSpec with DefaultTimeout { class Future2ActorSpec extends AkkaSpec with DefaultTimeout {
implicit val ec: ExecutionContextExecutor = system.dispatcher implicit val ec: ExecutionContextExecutor = system.dispatcher

View file

@ -4,8 +4,8 @@
package akka.dispatch package akka.dispatch
import akka.testkit.{ AkkaSpec, DefaultTimeout }
import akka.actor.{ Actor, Props } import akka.actor.{ Actor, Props }
import akka.testkit.{ AkkaSpec, DefaultTimeout }
object ControlAwareDispatcherSpec { object ControlAwareDispatcherSpec {
val config = """ val config = """

View file

@ -4,14 +4,17 @@
package akka.dispatch package akka.dispatch
import akka.actor.ActorSystem
import akka.testkit.TestKit
import java.lang.management.ManagementFactory import java.lang.management.ManagementFactory
import scala.concurrent.{ Await, Future } import scala.concurrent.{ Await, Future }
import scala.concurrent.duration._ import scala.concurrent.duration._
import org.scalatest.matchers.should.Matchers import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec import org.scalatest.wordspec.AnyWordSpec
import akka.actor.ActorSystem
import akka.testkit.TestKit
class DispatcherShutdownSpec extends AnyWordSpec with Matchers { class DispatcherShutdownSpec extends AnyWordSpec with Matchers {
"akka dispatcher" should { "akka dispatcher" should {

View file

@ -6,16 +6,18 @@ package akka.dispatch
import java.util.concurrent.{ Executor, ExecutorService, Executors } import java.util.concurrent.{ Executor, ExecutorService, Executors }
import java.util.concurrent.atomic.AtomicInteger import java.util.concurrent.atomic.AtomicInteger
import scala.concurrent.{ ExecutionContext, ExecutionContextExecutor, ExecutionContextExecutorService } import scala.concurrent.{ ExecutionContext, ExecutionContextExecutor, ExecutionContextExecutorService }
import scala.concurrent.{ blocking, Await, Future, Promise } import scala.concurrent.{ blocking, Await, Future, Promise }
import scala.concurrent.duration._ import scala.concurrent.duration._
import akka.testkit.{ AkkaSpec, DefaultTimeout, TestLatch }
import akka.util.SerializedSuspendableExecutionContext
import akka.testkit.TestActorRef
import akka.actor.Props
import akka.actor.Actor import akka.actor.Actor
import akka.testkit.TestProbe import akka.actor.Props
import akka.testkit.{ AkkaSpec, DefaultTimeout, TestLatch }
import akka.testkit.CallingThreadDispatcher import akka.testkit.CallingThreadDispatcher
import akka.testkit.TestActorRef
import akka.testkit.TestProbe
import akka.util.SerializedSuspendableExecutionContext
class ExecutionContextSpec extends AkkaSpec with DefaultTimeout { class ExecutionContextSpec extends AkkaSpec with DefaultTimeout {

View file

@ -4,9 +4,10 @@
package akka.dispatch package akka.dispatch
import com.typesafe.config.ConfigFactory
import akka.actor.{ Actor, Props } import akka.actor.{ Actor, Props }
import akka.testkit.{ AkkaSpec, ImplicitSender } import akka.testkit.{ AkkaSpec, ImplicitSender }
import com.typesafe.config.ConfigFactory
object ForkJoinPoolStarvationSpec { object ForkJoinPoolStarvationSpec {
val config = ConfigFactory.parseString(""" val config = ConfigFactory.parseString("""

View file

@ -4,18 +4,19 @@
package akka.dispatch package akka.dispatch
import language.postfixOps
import java.util.concurrent.{ BlockingQueue, ConcurrentLinkedQueue } import java.util.concurrent.{ BlockingQueue, ConcurrentLinkedQueue }
import org.scalatest.{ BeforeAndAfterAll, BeforeAndAfterEach }
import com.typesafe.config.{ Config, ConfigFactory }
import akka.actor._
import akka.testkit.{ AkkaSpec, EventFilter }
import akka.util.unused
import scala.concurrent.{ Await, ExecutionContext, Future } import scala.concurrent.{ Await, ExecutionContext, Future }
import scala.concurrent.duration._ import scala.concurrent.duration._
import com.typesafe.config.{ Config, ConfigFactory }
import language.postfixOps
import org.scalatest.{ BeforeAndAfterAll, BeforeAndAfterEach }
import akka.actor._
import akka.testkit.{ AkkaSpec, EventFilter }
import akka.util.unused
abstract class MailboxSpec extends AkkaSpec with BeforeAndAfterAll with BeforeAndAfterEach { abstract class MailboxSpec extends AkkaSpec with BeforeAndAfterAll with BeforeAndAfterEach {
def name: String def name: String

View file

@ -4,14 +4,15 @@
package akka.dispatch package akka.dispatch
import language.postfixOps import scala.concurrent.duration._
import com.typesafe.config.Config import com.typesafe.config.Config
import language.postfixOps
import akka.actor.{ Actor, ActorSystem, Props } import akka.actor.{ Actor, ActorSystem, Props }
import akka.testkit.{ AkkaSpec, DefaultTimeout } import akka.testkit.{ AkkaSpec, DefaultTimeout }
import akka.util.unused import akka.util.unused
import scala.concurrent.duration._
object PriorityDispatcherSpec { object PriorityDispatcherSpec {
case object Result case object Result

View file

@ -4,13 +4,14 @@
package akka.dispatch package akka.dispatch
import scala.concurrent.ExecutionContext
import scala.concurrent.Promise
import org.scalatest.matchers.should.Matchers
import akka.Done import akka.Done
import akka.dispatch.internal.SameThreadExecutionContext import akka.dispatch.internal.SameThreadExecutionContext
import akka.testkit.AkkaSpec import akka.testkit.AkkaSpec
import org.scalatest.matchers.should.Matchers
import scala.concurrent.ExecutionContext
import scala.concurrent.Promise
class SameThreadExecutionContextSpec extends AkkaSpec with Matchers { class SameThreadExecutionContextSpec extends AkkaSpec with Matchers {

View file

@ -4,14 +4,15 @@
package akka.dispatch package akka.dispatch
import language.postfixOps import scala.concurrent.duration._
import com.typesafe.config.Config import com.typesafe.config.Config
import language.postfixOps
import akka.actor.{ Actor, ActorSystem, Props } import akka.actor.{ Actor, ActorSystem, Props }
import akka.testkit.{ AkkaSpec, DefaultTimeout } import akka.testkit.{ AkkaSpec, DefaultTimeout }
import akka.util.unused import akka.util.unused
import scala.concurrent.duration._
object StablePriorityDispatcherSpec { object StablePriorityDispatcherSpec {
case object Result case object Result

View file

@ -4,12 +4,12 @@
package akka.dispatch.sysmsg package akka.dispatch.sysmsg
import akka.testkit.AkkaSpec
import akka.actor.Props import akka.actor.Props
import akka.testkit.AkkaSpec
class SystemMessageListSpec extends AkkaSpec { class SystemMessageListSpec extends AkkaSpec {
import SystemMessageList.LNil
import SystemMessageList.ENil import SystemMessageList.ENil
import SystemMessageList.LNil
val child = system.actorOf(Props.empty, "dummy") // need an ActorRef for the Failed msg val child = system.actorOf(Props.empty, "dummy") // need an ActorRef for the Failed msg

View file

@ -5,6 +5,7 @@
package akka.event package akka.event
import scala.concurrent.duration._ import scala.concurrent.duration._
import akka.actor.Actor import akka.actor.Actor
import akka.actor.ActorRef import akka.actor.ActorRef
import akka.actor.ActorSystem import akka.actor.ActorSystem

Some files were not shown because too many files have changed in this diff Show more