+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
|
|
@ -8,7 +8,8 @@ import java.time.{ Duration => JavaDuration }
|
|||
|
||||
import scala.concurrent.duration._
|
||||
|
||||
import akka.util.JavaDurationConverters._
|
||||
import com.typesafe.config.Config
|
||||
|
||||
import akka.actor.typed.ActorSystem
|
||||
import akka.actor.typed.Behavior
|
||||
import akka.actor.typed.SupervisorStrategy
|
||||
|
|
@ -21,7 +22,7 @@ import akka.persistence.typed.delivery.EventSourcedProducerQueue.CleanupTick
|
|||
import akka.persistence.typed.scaladsl.Effect
|
||||
import akka.persistence.typed.scaladsl.EventSourcedBehavior
|
||||
import akka.persistence.typed.scaladsl.RetentionCriteria
|
||||
import com.typesafe.config.Config
|
||||
import akka.util.JavaDurationConverters._
|
||||
|
||||
/**
|
||||
* [[DurableProducerQueue]] that can be used with [[akka.actor.typed.delivery.ProducerController]]
|
||||
|
|
|
|||
|
|
@ -4,19 +4,20 @@
|
|||
|
||||
package akka.persistence.typed.internal
|
||||
|
||||
import akka.actor.typed.Signal
|
||||
import akka.actor.typed.scaladsl.ActorContext
|
||||
import akka.actor.{ ActorRef, Cancellable }
|
||||
import akka.annotation.InternalApi
|
||||
import akka.persistence._
|
||||
import akka.persistence.typed.scaladsl.{ EventSourcedBehavior, RetentionCriteria }
|
||||
import akka.persistence.typed.{ EventAdapter, PersistenceId, SnapshotAdapter }
|
||||
import akka.util.OptionVal
|
||||
import org.slf4j.{ Logger, MDC }
|
||||
|
||||
import scala.concurrent.ExecutionContext
|
||||
import scala.util.control.NonFatal
|
||||
|
||||
import org.slf4j.{ Logger, MDC }
|
||||
|
||||
import akka.actor.{ ActorRef, Cancellable }
|
||||
import akka.actor.typed.Signal
|
||||
import akka.actor.typed.scaladsl.ActorContext
|
||||
import akka.annotation.InternalApi
|
||||
import akka.persistence._
|
||||
import akka.persistence.typed.{ EventAdapter, PersistenceId, SnapshotAdapter }
|
||||
import akka.persistence.typed.scaladsl.{ EventSourcedBehavior, RetentionCriteria }
|
||||
import akka.util.OptionVal
|
||||
|
||||
/**
|
||||
* INTERNAL API
|
||||
*/
|
||||
|
|
@ -51,6 +52,7 @@ private[akka] final class BehaviorSetup[C, E, S](
|
|||
|
||||
import BehaviorSetup._
|
||||
import InternalProtocol.RecoveryTickEvent
|
||||
|
||||
import akka.actor.typed.scaladsl.adapter._
|
||||
|
||||
val persistence: Persistence = Persistence(context.system.toClassic)
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ package akka.persistence.typed.internal
|
|||
|
||||
import scala.collection.immutable
|
||||
|
||||
import akka.actor.typed.ActorRef
|
||||
import akka.annotation.InternalApi
|
||||
import akka.persistence.typed.javadsl
|
||||
import akka.persistence.typed.scaladsl
|
||||
import akka.actor.typed.ActorRef
|
||||
|
||||
/** INTERNAL API */
|
||||
@InternalApi
|
||||
|
|
|
|||
|
|
@ -29,14 +29,14 @@ import akka.persistence.typed.DeleteSnapshotsCompleted
|
|||
import akka.persistence.typed.DeleteSnapshotsFailed
|
||||
import akka.persistence.typed.DeletionTarget
|
||||
import akka.persistence.typed.EventAdapter
|
||||
import akka.persistence.typed.SnapshotAdapter
|
||||
import akka.persistence.typed.NoOpEventAdapter
|
||||
import akka.persistence.typed.PersistenceId
|
||||
import akka.persistence.typed.SnapshotAdapter
|
||||
import akka.persistence.typed.SnapshotCompleted
|
||||
import akka.persistence.typed.SnapshotFailed
|
||||
import akka.persistence.typed.SnapshotSelectionCriteria
|
||||
import akka.persistence.typed.scaladsl.RetentionCriteria
|
||||
import akka.persistence.typed.scaladsl._
|
||||
import akka.persistence.typed.scaladsl.RetentionCriteria
|
||||
import akka.util.ConstantFun
|
||||
import akka.util.unused
|
||||
|
||||
|
|
|
|||
|
|
@ -8,10 +8,11 @@ import java.util.concurrent.TimeUnit
|
|||
|
||||
import scala.concurrent.duration._
|
||||
|
||||
import com.typesafe.config.Config
|
||||
|
||||
import akka.actor.typed.ActorSystem
|
||||
import akka.annotation.InternalApi
|
||||
import akka.persistence.Persistence
|
||||
import com.typesafe.config.Config
|
||||
|
||||
/**
|
||||
* INTERNAL API
|
||||
|
|
|
|||
|
|
@ -16,11 +16,9 @@ import akka.actor.typed.scaladsl.Behaviors
|
|||
import akka.actor.typed.scaladsl.LoggerOps
|
||||
import akka.annotation.InternalApi
|
||||
import akka.annotation.InternalStableApi
|
||||
|
||||
import akka.persistence._
|
||||
import akka.persistence.JournalProtocol.ReplayMessages
|
||||
import akka.persistence.SnapshotProtocol.LoadSnapshot
|
||||
import akka.persistence._
|
||||
|
||||
import akka.util.unused
|
||||
|
||||
/** INTERNAL API */
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
package akka.persistence.typed.internal
|
||||
|
||||
import scala.util.control.NonFatal
|
||||
import scala.concurrent.duration._
|
||||
import scala.util.control.NonFatal
|
||||
|
||||
import akka.actor.typed.{ Behavior, Signal }
|
||||
import akka.actor.typed.internal.PoisonPill
|
||||
|
|
@ -13,18 +13,18 @@ import akka.actor.typed.internal.UnstashException
|
|||
import akka.actor.typed.scaladsl.{ AbstractBehavior, ActorContext, Behaviors, LoggerOps }
|
||||
import akka.annotation.{ InternalApi, InternalStableApi }
|
||||
import akka.event.Logging
|
||||
import akka.persistence.JournalProtocol._
|
||||
import akka.persistence._
|
||||
import akka.persistence.JournalProtocol._
|
||||
import akka.persistence.typed.EmptyEventSeq
|
||||
import akka.persistence.typed.EventsSeq
|
||||
import akka.persistence.typed.RecoveryFailed
|
||||
import akka.persistence.typed.RecoveryCompleted
|
||||
import akka.persistence.typed.RecoveryFailed
|
||||
import akka.persistence.typed.SingleEventSeq
|
||||
import akka.persistence.typed.internal.ReplayingEvents.ReplayingState
|
||||
import akka.persistence.typed.internal.Running.WithSeqNrAccessible
|
||||
import akka.util.OptionVal
|
||||
import akka.util.unused
|
||||
import akka.util.PrettyDuration._
|
||||
import akka.util.unused
|
||||
|
||||
/***
|
||||
* INTERNAL API
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ import akka.actor.typed.Behavior
|
|||
import akka.actor.typed.internal.PoisonPill
|
||||
import akka.actor.typed.scaladsl.{ ActorContext, Behaviors }
|
||||
import akka.annotation.{ InternalApi, InternalStableApi }
|
||||
import akka.persistence._
|
||||
import akka.persistence.SnapshotProtocol.LoadSnapshotFailed
|
||||
import akka.persistence.SnapshotProtocol.LoadSnapshotResult
|
||||
import akka.persistence._
|
||||
import akka.persistence.typed.RecoveryFailed
|
||||
import akka.util.unused
|
||||
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
package akka.persistence.typed.internal
|
||||
|
||||
import akka.annotation.InternalApi
|
||||
import akka.persistence.typed.scaladsl
|
||||
import akka.persistence.typed.javadsl
|
||||
import akka.persistence.typed.scaladsl
|
||||
|
||||
/**
|
||||
* INTERNAL API
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ package akka.persistence.typed.internal
|
|||
|
||||
import scala.annotation.tailrec
|
||||
import scala.collection.immutable
|
||||
|
||||
import akka.actor.UnhandledMessage
|
||||
import akka.actor.typed.Behavior
|
||||
import akka.actor.typed.Signal
|
||||
|
|
@ -25,17 +26,17 @@ import akka.persistence.SaveSnapshotFailure
|
|||
import akka.persistence.SaveSnapshotSuccess
|
||||
import akka.persistence.SnapshotProtocol
|
||||
import akka.persistence.journal.Tagged
|
||||
import akka.persistence.typed.DeleteSnapshotsCompleted
|
||||
import akka.persistence.typed.DeleteSnapshotsFailed
|
||||
import akka.persistence.typed.DeleteEventsCompleted
|
||||
import akka.persistence.typed.DeleteEventsFailed
|
||||
import akka.persistence.typed.DeleteSnapshotsCompleted
|
||||
import akka.persistence.typed.DeleteSnapshotsFailed
|
||||
import akka.persistence.typed.DeletionTarget
|
||||
import akka.persistence.typed.EventRejectedException
|
||||
import akka.persistence.typed.SnapshotCompleted
|
||||
import akka.persistence.typed.SnapshotFailed
|
||||
import akka.persistence.typed.internal.Running.WithSeqNrAccessible
|
||||
import akka.persistence.typed.SnapshotMetadata
|
||||
import akka.persistence.typed.SnapshotSelectionCriteria
|
||||
import akka.persistence.typed.internal.Running.WithSeqNrAccessible
|
||||
import akka.persistence.typed.scaladsl.Effect
|
||||
import akka.util.unused
|
||||
|
||||
|
|
@ -91,9 +92,9 @@ private[akka] object Running {
|
|||
extends JournalInteractions[C, E, S]
|
||||
with SnapshotInteractions[C, E, S]
|
||||
with StashManagement[C, E, S] {
|
||||
import BehaviorSetup._
|
||||
import InternalProtocol._
|
||||
import Running.RunningState
|
||||
import BehaviorSetup._
|
||||
|
||||
final class HandlingCommands(state: RunningState[S])
|
||||
extends AbstractBehavior[InternalProtocol](setup.context)
|
||||
|
|
|
|||
|
|
@ -4,13 +4,13 @@
|
|||
|
||||
package akka.persistence.typed.internal
|
||||
|
||||
import akka.actor.typed.Behavior
|
||||
import akka.actor.Dropped
|
||||
import akka.actor.typed.scaladsl.adapter._
|
||||
import akka.actor.typed.scaladsl.StashOverflowException
|
||||
import akka.actor.typed.Behavior
|
||||
import akka.actor.typed.scaladsl.ActorContext
|
||||
import akka.actor.typed.scaladsl.LoggerOps
|
||||
import akka.actor.typed.scaladsl.StashBuffer
|
||||
import akka.actor.typed.scaladsl.StashOverflowException
|
||||
import akka.actor.typed.scaladsl.adapter._
|
||||
import akka.annotation.InternalApi
|
||||
import akka.util.ConstantFun
|
||||
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@ package akka.persistence.typed.javadsl
|
|||
import java.util.Objects
|
||||
import java.util.function.{ BiFunction, Predicate, Supplier, Function => JFunction }
|
||||
|
||||
import scala.compat.java8.FunctionConverters._
|
||||
|
||||
import akka.annotation.InternalApi
|
||||
import akka.persistence.typed.internal._
|
||||
import akka.util.OptionVal
|
||||
|
||||
import scala.compat.java8.FunctionConverters._
|
||||
|
||||
/**
|
||||
* FunctionalInterface for reacting on commands
|
||||
*
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@ package akka.persistence.typed.javadsl
|
|||
import java.util.Objects
|
||||
import java.util.function.{ BiFunction, Predicate, Supplier, Function => JFunction }
|
||||
|
||||
import scala.compat.java8.FunctionConverters._
|
||||
|
||||
import akka.annotation.InternalApi
|
||||
import akka.persistence.typed.internal._
|
||||
import akka.util.OptionVal
|
||||
|
||||
import scala.compat.java8.FunctionConverters._
|
||||
|
||||
/* Note that this is a copy of CommandHandler.scala to support ReplyEffect
|
||||
* s/Effect/ReplyEffect/
|
||||
* s/CommandHandler/CommandHandlerWithReply/
|
||||
|
|
|
|||
|
|
@ -4,13 +4,13 @@
|
|||
|
||||
package akka.persistence.typed.javadsl
|
||||
|
||||
import akka.util.ccompat.JavaConverters._
|
||||
import akka.actor.typed.ActorRef
|
||||
import akka.annotation.DoNotInherit
|
||||
import akka.annotation.InternalApi
|
||||
import akka.japi.function
|
||||
import akka.persistence.typed.internal.SideEffect
|
||||
import akka.persistence.typed.internal._
|
||||
import akka.actor.typed.ActorRef
|
||||
import akka.persistence.typed.internal.SideEffect
|
||||
import akka.util.ccompat.JavaConverters._
|
||||
|
||||
/**
|
||||
* INTERNAL API: see `class EffectFactories`
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@ package akka.persistence.typed.javadsl
|
|||
import java.util.Objects
|
||||
import java.util.function.{ BiFunction, Predicate, Supplier, Function => JFunction }
|
||||
|
||||
import scala.compat.java8.FunctionConverters._
|
||||
|
||||
import akka.annotation.InternalApi
|
||||
import akka.util.OptionVal
|
||||
|
||||
import scala.compat.java8.FunctionConverters._
|
||||
|
||||
/**
|
||||
* FunctionalInterface for reacting on events having been persisted
|
||||
*
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ import akka.actor.typed.Behavior
|
|||
import akka.actor.typed.internal.BehaviorImpl.DeferredBehavior
|
||||
import akka.actor.typed.javadsl.ActorContext
|
||||
import akka.annotation.InternalApi
|
||||
import akka.persistence.typed.EventAdapter
|
||||
import akka.persistence.typed._
|
||||
import akka.persistence.typed.EventAdapter
|
||||
import akka.persistence.typed.internal._
|
||||
import akka.util.unused
|
||||
|
||||
|
|
|
|||
|
|
@ -6,11 +6,12 @@ package akka.persistence.typed.javadsl
|
|||
|
||||
import java.time.Duration
|
||||
import java.util.Optional
|
||||
import akka.japi.function.Function3
|
||||
import akka.util.JavaDurationConverters._
|
||||
|
||||
import scala.compat.java8.OptionConverters._
|
||||
|
||||
import akka.japi.function.Function3
|
||||
import akka.persistence.typed.SnapshotAdapter
|
||||
import akka.util.JavaDurationConverters._
|
||||
|
||||
/**
|
||||
* Helper functions for migration from PersistentFSM to Persistence Typed
|
||||
|
|
|
|||
|
|
@ -5,10 +5,11 @@
|
|||
package akka.persistence.typed.scaladsl
|
||||
|
||||
import scala.collection.{ immutable => im }
|
||||
import akka.annotation.DoNotInherit
|
||||
import akka.persistence.typed.internal.SideEffect
|
||||
import akka.persistence.typed.internal._
|
||||
|
||||
import akka.actor.typed.ActorRef
|
||||
import akka.annotation.DoNotInherit
|
||||
import akka.persistence.typed.internal._
|
||||
import akka.persistence.typed.internal.SideEffect
|
||||
|
||||
/**
|
||||
* Factory methods for creating [[Effect]] directives - how an event sourced actor reacts on a command.
|
||||
|
|
|
|||
|
|
@ -5,17 +5,18 @@
|
|||
package akka.persistence.typed.scaladsl
|
||||
|
||||
import scala.annotation.tailrec
|
||||
|
||||
import akka.actor.typed.BackoffSupervisorStrategy
|
||||
import akka.actor.typed.Behavior
|
||||
import akka.actor.typed.internal.BehaviorImpl.DeferredBehavior
|
||||
import akka.actor.typed.Signal
|
||||
import akka.actor.typed.internal.BehaviorImpl.DeferredBehavior
|
||||
import akka.actor.typed.internal.InterceptorImpl
|
||||
import akka.actor.typed.internal.LoggerClass
|
||||
import akka.actor.typed.scaladsl.ActorContext
|
||||
import akka.annotation.DoNotInherit
|
||||
import akka.persistence.typed.EventAdapter
|
||||
import akka.persistence.typed.SnapshotAdapter
|
||||
import akka.persistence.typed.PersistenceId
|
||||
import akka.persistence.typed.SnapshotAdapter
|
||||
import akka.persistence.typed.SnapshotSelectionCriteria
|
||||
import akka.persistence.typed.internal._
|
||||
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@
|
|||
|
||||
package akka.persistence.typed.scaladsl
|
||||
|
||||
import scala.concurrent.duration.FiniteDuration
|
||||
|
||||
import akka.persistence.fsm.PersistentFSM.PersistentFSMSnapshot
|
||||
import akka.persistence.typed.SnapshotAdapter
|
||||
|
||||
import scala.concurrent.duration.FiniteDuration
|
||||
|
||||
/**
|
||||
* Helper functions for migration from PersistentFSM to Persistence Typed
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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