Packages

class SnapshotTestKit extends CommonTestKitOps[(SnapshotMetadata, Any), SnapshotOperation] with PolicyOpsTestKit[SnapshotOperation] with ExpectOps[(SnapshotMetadata, Any)] with HasStorage[SnapshotOperation, (SnapshotMetadata, Any)]

Class for testing snapshots of persistent actors.

NOTE! ActorSystem must be configured with PersistenceTestKitSnapshotPlugin. The configuration can be retrieved with PersistenceTestKitSnapshotPlugin.config.

Annotations
@ApiMayChange()
Source
PersistenceTestKit.scala
Linear Supertypes
HasStorage[SnapshotOperation, (SnapshotMetadata, Any)], ExpectOps[(SnapshotMetadata, Any)], CommonTestKitOps[(SnapshotMetadata, Any), SnapshotOperation], PolicyOpsTestKit[SnapshotOperation], ClearOps, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SnapshotTestKit
  2. HasStorage
  3. ExpectOps
  4. CommonTestKitOps
  5. PolicyOpsTestKit
  6. ClearOps
  7. AnyRef
  8. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SnapshotTestKit(system: ActorSystem)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from SnapshotTestKit to any2stringadd[SnapshotTestKit] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (SnapshotTestKit, B)
    Implicit
    This member is added by an implicit conversion from SnapshotTestKit to ArrowAssoc[SnapshotTestKit] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clearAll(): Unit

    Clear all data from the storage.

    Clear all data from the storage.

    NOTE! Also clears sequence numbers in storage!

    Definition Classes
    ClearOps
    See also

    ClearPreservingSeqNums.clearAllPreservingSeqNumbers()

  8. def clearByPersistenceId(persistenceId: String): Unit

    Clear all data from the storage for particular persistence id.

    Clear all data from the storage for particular persistence id.

    NOTE! Also clears sequence number in the storage!

    Definition Classes
    ClearOps
    See also

    ClearPreservingSeqNums.clearByIdPreservingSeqNumbers()

  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  10. def ensuring(cond: (SnapshotTestKit) ⇒ Boolean, msg: ⇒ Any): SnapshotTestKit
    Implicit
    This member is added by an implicit conversion from SnapshotTestKit to Ensuring[SnapshotTestKit] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: (SnapshotTestKit) ⇒ Boolean): SnapshotTestKit
    Implicit
    This member is added by an implicit conversion from SnapshotTestKit to Ensuring[SnapshotTestKit] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean, msg: ⇒ Any): SnapshotTestKit
    Implicit
    This member is added by an implicit conversion from SnapshotTestKit to Ensuring[SnapshotTestKit] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: Boolean): SnapshotTestKit
    Implicit
    This member is added by an implicit conversion from SnapshotTestKit to Ensuring[SnapshotTestKit] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  16. def expectNextPersisted[A](persistenceId: String, event: A, max: FiniteDuration): A

    Check for max time that next persisted in storage for particular persistence id event/snapshot was event.

    Check for max time that next persisted in storage for particular persistence id event/snapshot was event.

    Definition Classes
    ExpectOps
  17. def expectNextPersisted[A](persistenceId: String, event: A): A

    Check that next persisted in storage for particular persistence id event/snapshot was event.

    Check that next persisted in storage for particular persistence id event/snapshot was event.

    Definition Classes
    ExpectOps
  18. def expectNextPersistedClass[A](persistenceId: String, cla: Class[A], max: FiniteDuration): A

    Check for max time that next persisted in storage for particular persistence id event/snapshot has expected type.

    Check for max time that next persisted in storage for particular persistence id event/snapshot has expected type.

    Definition Classes
    ExpectOps
  19. def expectNextPersistedClass[A](persistenceId: String, cla: Class[A]): A

    Check that next persisted in storage for particular persistence id event/snapshot has expected type.

    Check that next persisted in storage for particular persistence id event/snapshot has expected type.

    Definition Classes
    ExpectOps
  20. def expectNextPersistedType[A](persistenceId: String, max: FiniteDuration)(implicit t: ClassTag[A]): A

    Check for max time that next persisted in storage for particular persistence id event/snapshot has expected type.

    Check for max time that next persisted in storage for particular persistence id event/snapshot has expected type.

    Definition Classes
    ExpectOps
  21. def expectNextPersistedType[A](persistenceId: String)(implicit t: ClassTag[A]): A

    Check that next persisted in storage for particular persistence id event/snapshot has expected type.

    Check that next persisted in storage for particular persistence id event/snapshot has expected type.

    Definition Classes
    ExpectOps
  22. def expectNothingPersisted(persistenceId: String, max: FiniteDuration): Unit

    Check for max time that nothing was persisted in storage for particular persistence id.

    Check for max time that nothing was persisted in storage for particular persistence id.

    Definition Classes
    ExpectOps
  23. def expectNothingPersisted(persistenceId: String): Unit

    Check that nothing was persisted in storage for particular persistence id.

    Check that nothing was persisted in storage for particular persistence id.

    Definition Classes
    ExpectOps
  24. def failNextDelete(persistenceId: String): Unit

    Fail next delete from storage attempt with default exception for particular persistence id.

    Fail next delete from storage attempt with default exception for particular persistence id.

    Definition Classes
    CommonTestKitOps
  25. def failNextDelete(persistenceId: String, cause: Throwable): Unit

    Fail next delete from storage attempt with cause exception for particular persistence id.

    Fail next delete from storage attempt with cause exception for particular persistence id.

    Definition Classes
    CommonTestKitOps
  26. def failNextDelete(): Unit

    Fail next delete from storage attempt with default exception for any persistence id.

    Fail next delete from storage attempt with default exception for any persistence id.

    Definition Classes
    CommonTestKitOps
  27. def failNextDelete(cause: Throwable): Unit

    Fail next delete from storage attempt with cause exception for any persistence id.

    Fail next delete from storage attempt with cause exception for any persistence id.

    Definition Classes
    CommonTestKitOps
  28. def failNextNDeletes(persistenceId: String, n: Int, cause: Throwable): Unit

    Fail next n delete from storage attempts with cause exception for particular persistence id.

    Fail next n delete from storage attempts with cause exception for particular persistence id.

    Definition Classes
    SnapshotTestKit → CommonTestKitOps
  29. def failNextNDeletes(n: Int, cause: Throwable): Unit

    Fail next n delete from storage attempts with cause exception for any persistence id.

    Fail next n delete from storage attempts with cause exception for any persistence id.

    Definition Classes
    SnapshotTestKit → CommonTestKitOps
  30. def failNextNDeletes(persistenceId: String, n: Int): Unit

    Fail next n delete from storage attempts with default exception for particular persistence id.

    Fail next n delete from storage attempts with default exception for particular persistence id.

    Definition Classes
    CommonTestKitOps
  31. def failNextNDeletes(n: Int): Unit

    Fail next n delete from storage attempts with default exception for any persistence id.

    Fail next n delete from storage attempts with default exception for any persistence id.

    Definition Classes
    CommonTestKitOps
  32. def failNextNOps(n: Int, cause: Throwable): Unit

    Fail n following journal operations regardless of their type.

    Fail n following journal operations regardless of their type. Fails operations with the cause exception.

    Definition Classes
    PolicyOpsTestKit
  33. def failNextNOps(n: Int): Unit

    Fail n following journal operations regardless of their type.

    Fail n following journal operations regardless of their type. Fails operations with default ExpectedFailure exception.

    Definition Classes
    PolicyOpsTestKit
  34. def failNextNOpsCond(cond: (String, SnapshotOperation) ⇒ Boolean, n: Int, cause: Throwable): Unit

    Fail n following journal operations depending on the condition cond.

    Fail n following journal operations depending on the condition cond. Failure triggers, when cond returns true. Fails operations with the cause exception.

    Definition Classes
    PolicyOpsTestKit
  35. def failNextNOpsCond(cond: (String, SnapshotOperation) ⇒ Boolean, n: Int): Unit

    Fail n following journal operations depending on the condition cond.

    Fail n following journal operations depending on the condition cond. Failure triggers, when cond returns true. Fails operations with default ExpectedFailure exception.

    Definition Classes
    PolicyOpsTestKit
  36. def failNextNPersisted(n: Int, cause: Throwable): Unit

    Fail next n write operations with the cause exception for any persistence id.

    Fail next n write operations with the cause exception for any persistence id.

    Definition Classes
    SnapshotTestKit → CommonTestKitOps
  37. def failNextNPersisted(persistenceId: String, n: Int, cause: Throwable): Unit

    Fail next n write operations with the cause exception for particular persistence id.

    Fail next n write operations with the cause exception for particular persistence id.

    Definition Classes
    SnapshotTestKit → CommonTestKitOps
  38. def failNextNPersisted(n: Int): Unit

    Fail next n write operations with default exception for any persistence id.

    Fail next n write operations with default exception for any persistence id.

    Definition Classes
    CommonTestKitOps
  39. def failNextNPersisted(persistenceId: String, n: Int): Unit

    Fail next n write operations for particular persistence id.

    Fail next n write operations for particular persistence id.

    Definition Classes
    CommonTestKitOps
  40. def failNextNReads(persistenceId: String, n: Int, cause: Throwable): Unit

    Fail next n read from storage (recovery) attempts with cause exception for particular persistence id.

    Fail next n read from storage (recovery) attempts with cause exception for particular persistence id.

    Definition Classes
    SnapshotTestKit → CommonTestKitOps
  41. def failNextNReads(n: Int, cause: Throwable): Unit

    Fail next n read from storage (recovery) attempts with cause exception for any persistence id.

    Fail next n read from storage (recovery) attempts with cause exception for any persistence id.

    Definition Classes
    SnapshotTestKit → CommonTestKitOps
  42. def failNextNReads(persistenceId: String, n: Int): Unit

    Fail next n read from storage (recovery) attempts with default exception for particular persistence id.

    Fail next n read from storage (recovery) attempts with default exception for particular persistence id.

    Definition Classes
    CommonTestKitOps
  43. def failNextNReads(n: Int): Unit

    Fail next n read from storage (recovery) attempts with default exception for any persistence id.

    Fail next n read from storage (recovery) attempts with default exception for any persistence id.

    Definition Classes
    CommonTestKitOps
  44. def failNextPersisted(): Unit

    Fail next write operation with default exception for any persistence id.

    Fail next write operation with default exception for any persistence id.

    Definition Classes
    CommonTestKitOps
  45. def failNextPersisted(cause: Throwable): Unit

    Fail next write operation with cause exception for any persistence id.

    Fail next write operation with cause exception for any persistence id.

    Definition Classes
    CommonTestKitOps
  46. def failNextPersisted(persistenceId: String): Unit

    Fail next write operation with default exception for particular persistence id.

    Fail next write operation with default exception for particular persistence id.

    Definition Classes
    CommonTestKitOps
  47. def failNextPersisted(persistenceId: String, cause: Throwable): Unit

    Fail next write operation with cause exception for particular persistence id.

    Fail next write operation with cause exception for particular persistence id.

    Definition Classes
    CommonTestKitOps
  48. def failNextRead(persistenceId: String): Unit

    Fail next read from storage (recovery) attempt with default exception for any persistence id.

    Fail next read from storage (recovery) attempt with default exception for any persistence id.

    Definition Classes
    CommonTestKitOps
  49. def failNextRead(persistenceId: String, cause: Throwable): Unit

    Fail next read from storage (recovery) attempt with cause exception for particular persistence id.

    Fail next read from storage (recovery) attempt with cause exception for particular persistence id.

    Definition Classes
    CommonTestKitOps
  50. def failNextRead(): Unit

    Fail next read from storage (recovery) attempt with default exception for any persistence id.

    Fail next read from storage (recovery) attempt with default exception for any persistence id.

    Definition Classes
    CommonTestKitOps
  51. def failNextRead(cause: Throwable): Unit

    Fail next read from storage (recovery) attempt with cause exception for any persistence id.

    Fail next read from storage (recovery) attempt with cause exception for any persistence id.

    Definition Classes
    CommonTestKitOps
  52. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from SnapshotTestKit to StringFormat[SnapshotTestKit] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  53. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  54. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  55. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  56. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  57. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  58. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  59. def persistForRecovery(persistenceId: String, elem: (SnapshotMeta, Any)): Unit

    Persist a pair of (snapshot metadata, snapshot payload) into storage.

  60. def persistForRecovery(persistenceId: String, elems: Seq[(SnapshotMeta, Any)]): Unit

    Persist elems pairs of (snapshot metadata, snapshot payload) into storage.

  61. def persistedInStorage(persistenceId: String): Seq[(SnapshotMeta, Any)]

    Retrieve snapshots and their metadata from storage by persistence id.

  62. def receivePersisted[A](persistenceId: String, n: Int, cla: Class[A], max: FiniteDuration): Seq[A]

    Receive for max time next n events/snapshots that have been persisted in the storage.

    Receive for max time next n events/snapshots that have been persisted in the storage.

    Definition Classes
    ExpectOps
  63. def receivePersisted[A](persistenceId: String, n: Int, cla: Class[A]): Seq[A]

    Receive next n events/snapshots that have been persisted in the storage.

    Receive next n events/snapshots that have been persisted in the storage.

    Definition Classes
    ExpectOps
  64. def receivePersisted[A](persistenceId: String, n: Int)(implicit t: ClassTag[A]): Seq[A]

    Receive next n events/snapshots that have been persisted in the storage.

    Receive next n events/snapshots that have been persisted in the storage.

    Definition Classes
    ExpectOps
  65. def receivePersisted[A](persistenceId: String, n: Int, max: FiniteDuration)(implicit t: ClassTag[A]): Seq[A]

    Receive for max time next n events/snapshots that have been persisted in the storage.

    Receive for max time next n events/snapshots that have been persisted in the storage.

    Definition Classes
    ExpectOps
  66. def resetPolicy(): Unit

    Returns default policy if it was changed by PolicyOpsTestKit.this.withPolicy().

    Returns default policy if it was changed by PolicyOpsTestKit.this.withPolicy().

    Definition Classes
    PolicyOpsTestKit
  67. val storage: SnapshotStorage
    Attributes
    protected
    Definition Classes
    SnapshotTestKit → HasStorage
  68. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  69. def toString(): String
    Definition Classes
    AnyRef → Any
  70. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  71. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  72. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  73. def withPolicy(policy: SnapshotStorage.SnapshotPolicies.PolicyType): SnapshotTestKit.this.type

    Set new processing policy for journal operations.

    Set new processing policy for journal operations. NOTE! Overrides previously invoked failNext... or rejectNext...

    Definition Classes
    PolicyOpsTestKit
  74. def [B](y: B): (SnapshotTestKit, B)
    Implicit
    This member is added by an implicit conversion from SnapshotTestKit to ArrowAssoc[SnapshotTestKit] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from HasStorage[SnapshotOperation, (SnapshotMetadata, Any)]

Inherited from ExpectOps[(SnapshotMetadata, Any)]

Inherited from CommonTestKitOps[(SnapshotMetadata, Any), SnapshotOperation]

Inherited from PolicyOpsTestKit[SnapshotOperation]

Inherited from ClearOps

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from SnapshotTestKit to any2stringadd[SnapshotTestKit]

Inherited by implicit conversion StringFormat from SnapshotTestKit to StringFormat[SnapshotTestKit]

Inherited by implicit conversion Ensuring from SnapshotTestKit to Ensuring[SnapshotTestKit]

Inherited by implicit conversion ArrowAssoc from SnapshotTestKit to ArrowAssoc[SnapshotTestKit]

Ungrouped