+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:
parent
ea7205eaf7
commit
0e4d41ad33
1534 changed files with 7454 additions and 6165 deletions
|
|
@ -4,19 +4,20 @@
|
|||
|
||||
package akka.persistence.typed
|
||||
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
import akka.actor
|
||||
import akka.actor.testkit.typed.scaladsl.LogCapturing
|
||||
import akka.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
|
||||
import akka.actor.testkit.typed.scaladsl.TestProbe
|
||||
import akka.actor.typed.ActorRef
|
||||
import akka.actor.typed.ActorSystem
|
||||
import akka.actor.typed.Behavior
|
||||
import akka.cluster.typed.ClusterSingleton
|
||||
import akka.cluster.typed.SingletonActor
|
||||
import akka.persistence.typed.scaladsl.Effect
|
||||
import akka.persistence.typed.scaladsl.EventSourcedBehavior
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
import akka.actor
|
||||
import akka.actor.typed.ActorSystem
|
||||
|
||||
object ClusterSingletonPersistenceSpec {
|
||||
val config = ConfigFactory.parseString("""
|
||||
|
|
@ -57,6 +58,7 @@ class ClusterSingletonPersistenceSpec
|
|||
with AnyWordSpecLike
|
||||
with LogCapturing {
|
||||
import ClusterSingletonPersistenceSpec._
|
||||
|
||||
import akka.actor.typed.scaladsl.adapter._
|
||||
|
||||
implicit val s: ActorSystem[Nothing] = system
|
||||
|
|
|
|||
|
|
@ -4,19 +4,20 @@
|
|||
|
||||
package akka.persistence.typed
|
||||
|
||||
import akka.actor.typed.scaladsl.Behaviors
|
||||
import akka.actor.typed.scaladsl.adapter.TypedActorSystemOps
|
||||
import akka.persistence.typed.scaladsl.EventSourcedBehavior.CommandHandler
|
||||
import akka.persistence.typed.scaladsl.{ Effect, EventSourcedBehavior }
|
||||
import akka.testkit.TestLatch
|
||||
import akka.actor.testkit.typed.scaladsl.TestProbe
|
||||
import scala.concurrent.Await
|
||||
import scala.concurrent.duration._
|
||||
|
||||
import akka.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
|
||||
import akka.actor.testkit.typed.scaladsl.LogCapturing
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
import akka.actor.testkit.typed.scaladsl.LogCapturing
|
||||
import akka.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
|
||||
import akka.actor.testkit.typed.scaladsl.TestProbe
|
||||
import akka.actor.typed.scaladsl.Behaviors
|
||||
import akka.actor.typed.scaladsl.adapter.TypedActorSystemOps
|
||||
import akka.persistence.typed.scaladsl.{ Effect, EventSourcedBehavior }
|
||||
import akka.persistence.typed.scaladsl.EventSourcedBehavior.CommandHandler
|
||||
import akka.testkit.TestLatch
|
||||
|
||||
object ManyRecoveriesSpec {
|
||||
|
||||
sealed case class Cmd(s: String)
|
||||
|
|
|
|||
|
|
@ -4,10 +4,11 @@
|
|||
|
||||
package akka.persistence.typed
|
||||
|
||||
import akka.actor.testkit.typed.scaladsl.LogCapturing
|
||||
import org.scalatest.matchers.should.Matchers
|
||||
import org.scalatest.wordspec.AnyWordSpec
|
||||
|
||||
import akka.actor.testkit.typed.scaladsl.LogCapturing
|
||||
|
||||
class PersistenceIdSpec extends AnyWordSpec with Matchers with LogCapturing {
|
||||
|
||||
"PersistenceId" must {
|
||||
|
|
|
|||
|
|
@ -6,25 +6,26 @@ package akka.persistence.typed
|
|||
|
||||
import java.util.concurrent.CyclicBarrier
|
||||
|
||||
import scala.concurrent.Future
|
||||
import scala.concurrent.Promise
|
||||
import scala.util.Success
|
||||
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
import akka.actor.testkit.typed.scaladsl.LogCapturing
|
||||
import akka.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
|
||||
import akka.actor.testkit.typed.scaladsl.TestProbe
|
||||
import akka.actor.typed.ActorSystem
|
||||
import akka.actor.typed.Extension
|
||||
import akka.actor.typed.ExtensionId
|
||||
import akka.actor.typed.scaladsl.adapter._
|
||||
import akka.persistence
|
||||
import akka.persistence.SelectedSnapshot
|
||||
import akka.persistence.snapshot.SnapshotStore
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import akka.actor.typed.scaladsl.adapter._
|
||||
import akka.persistence.typed.StashingWhenSnapshottingSpec.ControllableSnapshotStoreExt
|
||||
import akka.persistence.typed.scaladsl.Effect
|
||||
import akka.persistence.typed.scaladsl.EventSourcedBehavior
|
||||
import scala.concurrent.Future
|
||||
import scala.concurrent.Promise
|
||||
import scala.util.Success
|
||||
|
||||
import akka.actor.testkit.typed.scaladsl.LogCapturing
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
object StashingWhenSnapshottingSpec {
|
||||
object ControllableSnapshotStoreExt extends ExtensionId[ControllableSnapshotStoreExt] {
|
||||
|
|
|
|||
|
|
@ -6,10 +6,14 @@ package akka.persistence.typed.delivery
|
|||
|
||||
import java.util.UUID
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
|
||||
import scala.concurrent.duration._
|
||||
|
||||
import com.typesafe.config.Config
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
import akka.actor.testkit.typed.scaladsl._
|
||||
import akka.actor.typed.eventstream.EventStream
|
||||
import akka.actor.typed.delivery.DurableProducerQueue.Confirmed
|
||||
import akka.actor.typed.delivery.DurableProducerQueue.LoadState
|
||||
import akka.actor.typed.delivery.DurableProducerQueue.MessageSent
|
||||
|
|
@ -18,11 +22,9 @@ import akka.actor.typed.delivery.DurableProducerQueue.State
|
|||
import akka.actor.typed.delivery.DurableProducerQueue.StoreMessageConfirmed
|
||||
import akka.actor.typed.delivery.DurableProducerQueue.StoreMessageSent
|
||||
import akka.actor.typed.delivery.DurableProducerQueue.StoreMessageSentAck
|
||||
import akka.actor.typed.eventstream.EventStream
|
||||
import akka.persistence.journal.inmem.InmemJournal
|
||||
import akka.persistence.typed.PersistenceId
|
||||
import com.typesafe.config.Config
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
object EventSourcedProducerQueueSpec {
|
||||
def conf: Config =
|
||||
|
|
|
|||
|
|
@ -6,13 +6,14 @@ package akka.persistence.typed.delivery
|
|||
|
||||
import java.util.UUID
|
||||
|
||||
import com.typesafe.config.Config
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
import akka.actor.testkit.typed.scaladsl._
|
||||
import akka.actor.typed.delivery.ConsumerController
|
||||
import akka.actor.typed.delivery.ProducerController
|
||||
import akka.persistence.typed.PersistenceId
|
||||
import com.typesafe.config.Config
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
object ReliableDeliveryWithEventSourcedProducerQueueSpec {
|
||||
def conf: Config =
|
||||
|
|
|
|||
|
|
@ -7,15 +7,16 @@ package akka.persistence.typed.delivery
|
|||
import java.util.UUID
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
|
||||
import com.typesafe.config.Config
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
import akka.actor.testkit.typed.FishingOutcome
|
||||
import akka.actor.testkit.typed.scaladsl._
|
||||
import akka.actor.typed.delivery.ConsumerController
|
||||
import akka.actor.typed.delivery.WorkPullingProducerController
|
||||
import akka.actor.typed.receptionist.ServiceKey
|
||||
import akka.persistence.typed.PersistenceId
|
||||
import com.typesafe.config.Config
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
object WorkPullingWithEventSourcedProducerQueueSpec {
|
||||
def conf: Config =
|
||||
|
|
|
|||
|
|
@ -4,25 +4,26 @@
|
|||
|
||||
package akka.persistence.typed.internal
|
||||
|
||||
import akka.actor.PoisonPill
|
||||
import akka.actor.testkit.typed.scaladsl.TestProbe
|
||||
import akka.actor.typed.scaladsl.Behaviors
|
||||
import akka.actor.typed.scaladsl.adapter.{ TypedActorRefOps, TypedActorSystemOps }
|
||||
import akka.actor.typed.{ ActorRef, Behavior }
|
||||
import akka.persistence.Persistence
|
||||
import akka.persistence.RecoveryPermitter.{ RecoveryPermitGranted, RequestRecoveryPermit, ReturnRecoveryPermit }
|
||||
import akka.persistence.typed.scaladsl.EventSourcedBehavior.CommandHandler
|
||||
import akka.persistence.typed.scaladsl.{ Effect, EventSourcedBehavior }
|
||||
import scala.concurrent.duration._
|
||||
import scala.util.control.NoStackTrace
|
||||
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
import akka.actor.ActorSystem
|
||||
import akka.actor.PoisonPill
|
||||
import akka.actor.testkit.typed.scaladsl.LogCapturing
|
||||
import akka.actor.testkit.typed.scaladsl.LoggingTestKit
|
||||
import akka.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
|
||||
import akka.actor.testkit.typed.scaladsl.LogCapturing
|
||||
import akka.actor.testkit.typed.scaladsl.TestProbe
|
||||
import akka.actor.typed.{ ActorRef, Behavior }
|
||||
import akka.actor.typed.scaladsl.Behaviors
|
||||
import akka.actor.typed.scaladsl.adapter.{ TypedActorRefOps, TypedActorSystemOps }
|
||||
import akka.persistence.Persistence
|
||||
import akka.persistence.RecoveryPermitter.{ RecoveryPermitGranted, RequestRecoveryPermit, ReturnRecoveryPermit }
|
||||
import akka.persistence.typed.PersistenceId
|
||||
import akka.persistence.typed.RecoveryCompleted
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
import akka.actor.ActorSystem
|
||||
import akka.persistence.typed.scaladsl.{ Effect, EventSourcedBehavior }
|
||||
import akka.persistence.typed.scaladsl.EventSourcedBehavior.CommandHandler
|
||||
|
||||
object RecoveryPermitterSpec {
|
||||
|
||||
|
|
|
|||
|
|
@ -4,12 +4,13 @@
|
|||
|
||||
package akka.persistence.typed.internal
|
||||
|
||||
import akka.actor.testkit.typed.scaladsl.LogCapturing
|
||||
import akka.persistence.typed.scaladsl.RetentionCriteria
|
||||
import org.scalatest.TestSuite
|
||||
import org.scalatest.matchers.should.Matchers
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
import akka.actor.testkit.typed.scaladsl.LogCapturing
|
||||
import akka.persistence.typed.scaladsl.RetentionCriteria
|
||||
|
||||
class RetentionCriteriaSpec extends TestSuite with Matchers with AnyWordSpecLike with LogCapturing {
|
||||
|
||||
"RetentionCriteria" must {
|
||||
|
|
|
|||
|
|
@ -6,14 +6,15 @@ package akka.persistence.typed.internal
|
|||
|
||||
import scala.concurrent.duration._
|
||||
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
import akka.actor.testkit.typed.scaladsl.LogCapturing
|
||||
import akka.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
|
||||
import akka.actor.testkit.typed.scaladsl.TestProbe
|
||||
import akka.actor.testkit.typed.scaladsl.LogCapturing
|
||||
import akka.actor.typed.Behavior
|
||||
import akka.actor.typed.scaladsl.Behaviors
|
||||
import akka.persistence.typed.internal.InternalProtocol.IncomingCommand
|
||||
import akka.persistence.typed.internal.InternalProtocol.RecoveryPermitGranted
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
class StashStateSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing {
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,10 @@ import scala.concurrent.Future
|
|||
import scala.concurrent.duration._
|
||||
import scala.util.Try
|
||||
|
||||
import com.typesafe.config.Config
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
import akka.actor.testkit.typed.TestException
|
||||
import akka.actor.testkit.typed.TestKitSettings
|
||||
import akka.actor.testkit.typed.scaladsl._
|
||||
|
|
@ -27,9 +31,6 @@ import akka.persistence.typed.RecoveryCompleted
|
|||
import akka.persistence.typed.RecoveryCompleted
|
||||
import akka.persistence.typed.RecoveryFailed
|
||||
import akka.persistence.typed.internal.JournalFailureException
|
||||
import com.typesafe.config.Config
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
class ChaosJournal extends InmemJournal {
|
||||
var counts = Map.empty[String, Int]
|
||||
|
|
|
|||
|
|
@ -6,6 +6,10 @@ package akka.persistence.typed.scaladsl
|
|||
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
|
||||
import com.typesafe.config.Config
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
import akka.actor.testkit.typed.scaladsl._
|
||||
import akka.actor.typed.ActorRef
|
||||
import akka.actor.typed.Behavior
|
||||
|
|
@ -13,9 +17,6 @@ import akka.actor.typed.BehaviorInterceptor
|
|||
import akka.actor.typed.TypedActorContext
|
||||
import akka.actor.typed.scaladsl.Behaviors
|
||||
import akka.persistence.typed.PersistenceId
|
||||
import com.typesafe.config.Config
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
object EventSourcedBehaviorInterceptorSpec {
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,10 @@ import java.util.concurrent.atomic.AtomicInteger
|
|||
|
||||
import scala.concurrent.duration._
|
||||
|
||||
import com.typesafe.config.Config
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
import akka.actor.testkit.typed.scaladsl._
|
||||
import akka.actor.typed.ActorRef
|
||||
import akka.actor.typed.Behavior
|
||||
|
|
@ -17,9 +21,6 @@ import akka.persistence.journal.SteppingInmemJournal
|
|||
import akka.persistence.typed.PersistenceId
|
||||
import akka.persistence.typed.RecoveryFailed
|
||||
import akka.persistence.typed.internal.JournalFailureException
|
||||
import com.typesafe.config.Config
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
object EventSourcedBehaviorRecoveryTimeoutSpec {
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,10 @@ package akka.persistence.typed.scaladsl
|
|||
import java.util.UUID
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
|
||||
import com.typesafe.config.Config
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
import akka.Done
|
||||
import akka.actor.testkit.typed.scaladsl._
|
||||
import akka.actor.typed.ActorRef
|
||||
|
|
@ -15,9 +19,6 @@ import akka.actor.typed.scaladsl.ActorContext
|
|||
import akka.actor.typed.scaladsl.Behaviors
|
||||
import akka.persistence.typed.PersistenceId
|
||||
import akka.serialization.jackson.CborSerializable
|
||||
import com.typesafe.config.Config
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
object EventSourcedBehaviorReplySpec {
|
||||
def conf: Config = ConfigFactory.parseString(s"""
|
||||
|
|
|
|||
|
|
@ -7,8 +7,15 @@ package akka.persistence.typed.scaladsl
|
|||
import java.util.UUID
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
|
||||
import scala.concurrent.duration._
|
||||
import scala.util.Success
|
||||
import scala.util.Try
|
||||
|
||||
import com.typesafe.config.Config
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.matchers.should.Matchers
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
import akka.actor.testkit.typed.scaladsl._
|
||||
import akka.actor.typed.ActorRef
|
||||
import akka.actor.typed.Behavior
|
||||
|
|
@ -26,11 +33,6 @@ import akka.persistence.typed.SnapshotFailed
|
|||
import akka.persistence.typed.SnapshotSelectionCriteria
|
||||
import akka.serialization.jackson.CborSerializable
|
||||
import akka.util.unused
|
||||
import com.typesafe.config.Config
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import scala.concurrent.duration._
|
||||
import org.scalatest.matchers.should.Matchers
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
object EventSourcedBehaviorRetentionSpec extends Matchers {
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,10 @@ import scala.util.Failure
|
|||
import scala.util.Success
|
||||
import scala.util.Try
|
||||
|
||||
import com.typesafe.config.Config
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
import akka.Done
|
||||
import akka.actor.ActorInitializationException
|
||||
import akka.actor.testkit.typed.TestException
|
||||
|
|
@ -25,6 +29,8 @@ import akka.actor.typed.SupervisorStrategy
|
|||
import akka.actor.typed.Terminated
|
||||
import akka.actor.typed.scaladsl.ActorContext
|
||||
import akka.actor.typed.scaladsl.Behaviors
|
||||
import akka.persistence.{ SnapshotMetadata => ClassicSnapshotMetadata }
|
||||
import akka.persistence.{ SnapshotSelectionCriteria => ClassicSnapshotSelectionCriteria }
|
||||
import akka.persistence.SelectedSnapshot
|
||||
import akka.persistence.journal.inmem.InmemJournal
|
||||
import akka.persistence.query.EventEnvelope
|
||||
|
|
@ -37,13 +43,8 @@ import akka.persistence.typed.RecoveryCompleted
|
|||
import akka.persistence.typed.SnapshotCompleted
|
||||
import akka.persistence.typed.SnapshotFailed
|
||||
import akka.persistence.typed.SnapshotMetadata
|
||||
import akka.persistence.{ SnapshotMetadata => ClassicSnapshotMetadata }
|
||||
import akka.persistence.{ SnapshotSelectionCriteria => ClassicSnapshotSelectionCriteria }
|
||||
import akka.serialization.jackson.CborSerializable
|
||||
import akka.stream.scaladsl.Sink
|
||||
import com.typesafe.config.Config
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
object EventSourcedBehaviorSpec {
|
||||
|
||||
|
|
|
|||
|
|
@ -10,13 +10,17 @@ import java.util.concurrent.atomic.AtomicInteger
|
|||
|
||||
import scala.concurrent.duration._
|
||||
|
||||
import com.typesafe.config.Config
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
import akka.NotUsed
|
||||
import akka.actor.Dropped
|
||||
import akka.actor.UnhandledMessage
|
||||
import akka.actor.testkit.typed.TestException
|
||||
import akka.actor.testkit.typed.scaladsl._
|
||||
import akka.actor.typed.ActorRef
|
||||
import akka.actor.typed.Behavior
|
||||
import akka.actor.Dropped
|
||||
import akka.actor.UnhandledMessage
|
||||
import akka.actor.typed.PostStop
|
||||
import akka.actor.typed.SupervisorStrategy
|
||||
import akka.actor.typed.eventstream.EventStream
|
||||
|
|
@ -26,9 +30,6 @@ import akka.actor.typed.scaladsl.Behaviors
|
|||
import akka.actor.typed.scaladsl.adapter._
|
||||
import akka.persistence.typed.PersistenceId
|
||||
import akka.persistence.typed.RecoveryCompleted
|
||||
import com.typesafe.config.Config
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
object EventSourcedBehaviorStashSpec {
|
||||
def conf: Config = ConfigFactory.parseString(s"""
|
||||
|
|
|
|||
|
|
@ -9,14 +9,15 @@ import java.util.concurrent.atomic.AtomicInteger
|
|||
|
||||
import scala.concurrent.duration._
|
||||
|
||||
import com.typesafe.config.Config
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
import akka.actor.testkit.typed.scaladsl._
|
||||
import akka.actor.typed.ActorRef
|
||||
import akka.actor.typed.Behavior
|
||||
import akka.actor.typed.scaladsl.Behaviors
|
||||
import akka.persistence.typed.PersistenceId
|
||||
import com.typesafe.config.Config
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
object EventSourcedBehaviorTimersSpec {
|
||||
|
||||
|
|
|
|||
|
|
@ -6,11 +6,14 @@ package akka.persistence.typed.scaladsl
|
|||
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
import akka.actor.testkit.typed.TestException
|
||||
import akka.actor.testkit.typed.scaladsl.{ LogCapturing, LoggingTestKit, ScalaTestWithActorTestKit, TestProbe }
|
||||
import akka.actor.typed._
|
||||
import akka.actor.typed.scaladsl.{ ActorContext, Behaviors }
|
||||
import akka.persistence.Recovery
|
||||
import akka.persistence.typed.{ NoOpEventAdapter, PersistenceId, RecoveryCompleted }
|
||||
import akka.persistence.typed.internal.{
|
||||
BehaviorSetup,
|
||||
EventSourcedSettings,
|
||||
|
|
@ -19,10 +22,8 @@ import akka.persistence.typed.internal.{
|
|||
StashState
|
||||
}
|
||||
import akka.persistence.typed.internal.EventSourcedBehaviorImpl.WriterIdentity
|
||||
import akka.persistence.typed.{ NoOpEventAdapter, PersistenceId, RecoveryCompleted }
|
||||
import akka.serialization.jackson.CborSerializable
|
||||
import akka.util.ConstantFun
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
object EventSourcedBehaviorWatchSpec {
|
||||
sealed trait Command extends CborSerializable
|
||||
|
|
|
|||
|
|
@ -7,9 +7,12 @@ package akka.persistence.typed.scaladsl
|
|||
import java.util.UUID
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
import akka.actor.testkit.typed.scaladsl.LogCapturing
|
||||
import akka.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
|
||||
import akka.actor.testkit.typed.scaladsl.TestProbe
|
||||
import akka.actor.testkit.typed.scaladsl.LogCapturing
|
||||
import akka.actor.typed.ActorRef
|
||||
import akka.actor.typed.scaladsl.Behaviors
|
||||
import akka.persistence.query.EventEnvelope
|
||||
|
|
@ -22,8 +25,6 @@ import akka.persistence.typed.PersistenceId
|
|||
import akka.serialization.jackson.CborSerializable
|
||||
import akka.stream.scaladsl.Sink
|
||||
import akka.testkit.JavaSerializable
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
object EventSourcedEventAdapterSpec {
|
||||
|
||||
|
|
@ -84,7 +85,6 @@ class EventSourcedEventAdapterSpec
|
|||
extends ScalaTestWithActorTestKit(EventSourcedEventAdapterSpec.conf)
|
||||
with AnyWordSpecLike
|
||||
with LogCapturing {
|
||||
import EventSourcedEventAdapterSpec._
|
||||
import EventSourcedBehaviorSpec.{
|
||||
counter,
|
||||
Command,
|
||||
|
|
@ -95,6 +95,7 @@ class EventSourcedEventAdapterSpec
|
|||
Incremented,
|
||||
State
|
||||
}
|
||||
import EventSourcedEventAdapterSpec._
|
||||
|
||||
val pidCounter = new AtomicInteger(0)
|
||||
private def nextPid(): PersistenceId = PersistenceId.ofUniqueId(s"c${pidCounter.incrementAndGet()})")
|
||||
|
|
|
|||
|
|
@ -4,14 +4,15 @@
|
|||
|
||||
package akka.persistence.typed.scaladsl
|
||||
|
||||
import akka.actor.testkit.typed.scaladsl.LogCapturing
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
import akka.actor.testkit.typed.scaladsl.{ ScalaTestWithActorTestKit, TestProbe }
|
||||
import akka.actor.testkit.typed.scaladsl.LogCapturing
|
||||
import akka.actor.typed.{ ActorRef, Behavior }
|
||||
import akka.actor.typed.scaladsl.Behaviors
|
||||
import akka.persistence.typed.PersistenceId
|
||||
import akka.persistence.typed.RecoveryCompleted
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
object EventSourcedSequenceNumberSpec {
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,10 @@ package akka.persistence.typed.scaladsl
|
|||
import java.util.UUID
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
|
||||
import com.typesafe.config.Config
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
import akka.actor.testkit.typed.scaladsl.LogCapturing
|
||||
import akka.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
|
||||
import akka.actor.testkit.typed.scaladsl.TestProbe
|
||||
|
|
@ -16,9 +20,6 @@ import akka.persistence.query.journal.leveldb.scaladsl.LeveldbReadJournal
|
|||
import akka.persistence.typed.PersistenceId
|
||||
import akka.persistence.typed.SnapshotAdapter
|
||||
import akka.serialization.jackson.CborSerializable
|
||||
import com.typesafe.config.Config
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
object EventSourcedSnapshotAdapterSpec {
|
||||
private val conf: Config = ConfigFactory.parseString(s"""
|
||||
|
|
@ -38,6 +39,7 @@ class EventSourcedSnapshotAdapterSpec
|
|||
with AnyWordSpecLike
|
||||
with LogCapturing {
|
||||
import EventSourcedSnapshotAdapterSpec._
|
||||
|
||||
import akka.actor.typed.scaladsl.adapter._
|
||||
|
||||
val pidCounter = new AtomicInteger(0)
|
||||
|
|
|
|||
|
|
@ -5,17 +5,18 @@
|
|||
package akka.persistence.typed.scaladsl
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
import org.slf4j.event.Level
|
||||
|
||||
import akka.actor.testkit.typed.scaladsl.LogCapturing
|
||||
import akka.actor.testkit.typed.scaladsl.LoggingTestKit
|
||||
import akka.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
|
||||
import akka.actor.testkit.typed.scaladsl.LogCapturing
|
||||
import akka.actor.typed.Behavior
|
||||
import akka.actor.typed.scaladsl.Behaviors
|
||||
import akka.persistence.typed.PersistenceId
|
||||
import akka.persistence.typed.RecoveryCompleted
|
||||
import akka.persistence.typed.SnapshotCompleted
|
||||
import akka.persistence.typed.SnapshotFailed
|
||||
import org.slf4j.event.Level
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
// Note that the spec name here is important since there are heuristics in place to avoid names
|
||||
// starting with EventSourcedBehavior
|
||||
|
|
|
|||
|
|
@ -4,14 +4,15 @@
|
|||
|
||||
package akka.persistence.typed.scaladsl
|
||||
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
import akka.actor.testkit.typed.TestKitSettings
|
||||
import akka.actor.testkit.typed.scaladsl._
|
||||
import akka.actor.typed.ActorRef
|
||||
import akka.actor.typed.Behavior
|
||||
import akka.persistence.typed.PersistenceId
|
||||
import akka.persistence.typed.RecoveryCompleted
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
object NullEmptyStateSpec {
|
||||
|
||||
|
|
|
|||
|
|
@ -6,14 +6,15 @@ package akka.persistence.typed.scaladsl
|
|||
|
||||
import java.util.UUID
|
||||
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
import akka.actor.testkit.typed.scaladsl.LogCapturing
|
||||
import akka.actor.testkit.typed.scaladsl.LoggingTestKit
|
||||
import akka.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
|
||||
import akka.actor.testkit.typed.scaladsl.TestProbe
|
||||
import akka.actor.testkit.typed.scaladsl.LogCapturing
|
||||
import akka.persistence.typed.PersistenceId
|
||||
import akka.persistence.typed.scaladsl.EventSourcedBehavior.CommandHandler
|
||||
import akka.serialization.jackson.CborSerializable
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
object OptionalSnapshotStoreSpec {
|
||||
|
||||
|
|
|
|||
|
|
@ -8,18 +8,19 @@ import java.util.UUID
|
|||
|
||||
import scala.concurrent.duration._
|
||||
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
import akka.actor.testkit.typed.TestException
|
||||
import akka.actor.testkit.typed.scaladsl.LogCapturing
|
||||
import akka.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
|
||||
import akka.actor.testkit.typed.scaladsl.TestProbe
|
||||
import akka.actor.testkit.typed.scaladsl.LogCapturing
|
||||
import akka.actor.typed.ActorRef
|
||||
import akka.actor.typed.SupervisorStrategy
|
||||
import akka.actor.typed.scaladsl.Behaviors
|
||||
import akka.persistence.typed.PersistenceId
|
||||
import akka.persistence.typed.RecoveryCompleted
|
||||
import akka.persistence.typed.scaladsl.EventSourcedBehavior.CommandHandler
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
object PerformanceSpec {
|
||||
|
||||
|
|
|
|||
|
|
@ -4,18 +4,18 @@
|
|||
|
||||
package akka.persistence.typed.scaladsl
|
||||
|
||||
import akka.actor.typed.ActorSystem
|
||||
|
||||
import scala.concurrent.ExecutionContext
|
||||
import scala.concurrent.Future
|
||||
import scala.concurrent.duration._
|
||||
|
||||
import com.github.ghik.silencer.silent
|
||||
|
||||
import akka.actor.typed.{ ActorRef, Behavior }
|
||||
import akka.actor.typed.ActorSystem
|
||||
import akka.actor.typed.scaladsl.Behaviors
|
||||
import akka.actor.typed.scaladsl.TimerScheduler
|
||||
import akka.persistence.typed.PersistenceId
|
||||
import akka.persistence.typed.RecoveryCompleted
|
||||
import com.github.ghik.silencer.silent
|
||||
|
||||
import scala.concurrent.Future
|
||||
|
||||
// unused names in pattern match can be useful in the docs
|
||||
@silent
|
||||
|
|
|
|||
|
|
@ -4,13 +4,14 @@
|
|||
|
||||
package akka.persistence.typed.scaladsl
|
||||
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
import akka.actor.testkit.typed.scaladsl._
|
||||
import akka.actor.typed.ActorRef
|
||||
import akka.actor.typed.Behavior
|
||||
import akka.persistence.typed.PersistenceId
|
||||
import akka.persistence.typed.RecoveryCompleted
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
object PrimitiveStateSpec {
|
||||
|
||||
|
|
|
|||
|
|
@ -4,13 +4,13 @@
|
|||
|
||||
package akka.persistence.typed.scaladsl
|
||||
|
||||
import scala.concurrent.Future
|
||||
|
||||
import akka.persistence.{ SnapshotMetadata => ClassicSnapshotMetadata }
|
||||
import akka.persistence.{ SnapshotSelectionCriteria => ClassicSnapshotSelectionCriteria }
|
||||
import akka.persistence.SelectedSnapshot
|
||||
import akka.persistence.snapshot.SnapshotStore
|
||||
import akka.persistence.typed.scaladsl.SnapshotMutableStateSpec.MutableState
|
||||
import akka.persistence.{ SnapshotSelectionCriteria => ClassicSnapshotSelectionCriteria }
|
||||
import akka.persistence.{ SnapshotMetadata => ClassicSnapshotMetadata }
|
||||
|
||||
import scala.concurrent.Future
|
||||
|
||||
class SlowInMemorySnapshotStore extends SnapshotStore {
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,10 @@ package akka.persistence.typed.scaladsl
|
|||
import java.util.UUID
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
|
||||
import com.typesafe.config.Config
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
import akka.actor.testkit.typed.scaladsl._
|
||||
import akka.actor.typed.ActorRef
|
||||
import akka.actor.typed.Behavior
|
||||
|
|
@ -14,9 +18,6 @@ import akka.persistence.typed.PersistenceId
|
|||
import akka.persistence.typed.SnapshotCompleted
|
||||
import akka.persistence.typed.SnapshotFailed
|
||||
import akka.serialization.jackson.CborSerializable
|
||||
import com.typesafe.config.Config
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
object SnapshotMutableStateSpec {
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,11 @@ package akka.persistence.typed.scaladsl
|
|||
import java.io.File
|
||||
import java.util.UUID
|
||||
|
||||
import com.typesafe.config.Config
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.apache.commons.io.FileUtils
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
import akka.actor.testkit.typed.scaladsl.LogCapturing
|
||||
import akka.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
|
||||
import akka.actor.typed.ActorRef
|
||||
|
|
@ -16,10 +21,6 @@ import akka.persistence.serialization.Snapshot
|
|||
import akka.persistence.typed.PersistenceId
|
||||
import akka.serialization.Serialization
|
||||
import akka.serialization.SerializationExtension
|
||||
import com.typesafe.config.Config
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.apache.commons.io.FileUtils
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
|
||||
object SnapshotRecoveryWithEmptyJournalSpec {
|
||||
val survivingSnapshotPath = s"target/survivingSnapshotPath-${UUID.randomUUID().toString}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue