Packages

class PersistenceTestKit extends AnyRef

Class for testing persisted events in persistent actors.

Annotations
@ApiMayChange()
Source
PersistenceTestKit.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PersistenceTestKit
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new PersistenceTestKit(system: ActorSystem)
  2. new PersistenceTestKit(scalaTestkit: scaladsl.PersistenceTestKit)

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 PersistenceTestKit toany2stringadd[PersistenceTestKit] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (PersistenceTestKit, B)
    Implicit
    This member is added by an implicit conversion from PersistenceTestKit toArrowAssoc[PersistenceTestKit] 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 storage.

    Clear all data from storage.

    NOTE! Also clears sequence numbers in storage!

    See also

    PersistenceTestKit.clearAllPreservingSeqNumbers()

  8. def clearAllPreservingSeqNumbers(): Unit

    Clear all data in storage preserving sequence numbers.

    Clear all data in storage preserving sequence numbers.

    See also

    PersistenceTestKit.clearAll()

  9. def clearByIdPreservingSeqNumbers(persistenceId: String): Unit

    Clear all data in storage for particular persistence id preserving sequence numbers.

    Clear all data in storage for particular persistence id preserving sequence numbers.

    See also

    PersistenceTestKit.clearByPersistenceId()

  10. def clearByPersistenceId(persistenceId: String): Unit

    Clear all data from storage for particular persistence id.

    Clear all data from storage for particular persistence id.

    NOTE! Also clears sequence number in storage!

    See also

    PersistenceTestKit.clearByIdPreservingSeqNumbers()

  11. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  12. def ensuring(cond: (PersistenceTestKit) => Boolean, msg: => Any): PersistenceTestKit
    Implicit
    This member is added by an implicit conversion from PersistenceTestKit toEnsuring[PersistenceTestKit] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: (PersistenceTestKit) => Boolean): PersistenceTestKit
    Implicit
    This member is added by an implicit conversion from PersistenceTestKit toEnsuring[PersistenceTestKit] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. def ensuring(cond: Boolean, msg: => Any): PersistenceTestKit
    Implicit
    This member is added by an implicit conversion from PersistenceTestKit toEnsuring[PersistenceTestKit] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. def ensuring(cond: Boolean): PersistenceTestKit
    Implicit
    This member is added by an implicit conversion from PersistenceTestKit toEnsuring[PersistenceTestKit] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  16. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  18. def expectNextPersisted[A](persistenceId: String, event: A, max: Duration): A

    Check for max time that event has been saved in the storage.

  19. def expectNextPersisted[A](persistenceId: String, event: A): A

    Check that event has been saved in the storage.

  20. def expectNextPersistedClass[A](persistenceId: String, cla: Class[A], max: Duration): A

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

  21. def expectNextPersistedClass[A](persistenceId: String, cla: Class[A]): A

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

  22. def expectNothingPersisted(persistenceId: String, max: Duration): Unit

    Check for max time that nothing has been saved in the storage.

  23. def expectNothingPersisted(persistenceId: String): Unit

    Check that nothing has been saved in the storage.

  24. def failNextDelete(persistenceId: String): Unit

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

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

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

  26. def failNextDelete(): Unit

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

  27. def failNextDelete(cause: Throwable): Unit

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

  28. def failNextNDeletes(persistenceId: String, n: Int): Unit

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

  29. def failNextNDeletes(persistenceId: String, n: Int, cause: Throwable): Unit

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

  30. def failNextNDeletes(n: Int): Unit

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

  31. def failNextNDeletes(n: Int, cause: Throwable): Unit

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

  32. def failNextNOps(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.

  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.

  34. def failNextNOpsCond(cond: BiFunction[String, JournalOperation, 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.

  35. def failNextNOpsCond(cond: BiFunction[String, JournalOperation, 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.

  36. def failNextNPersisted(n: Int): Unit

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

  37. def failNextNPersisted(n: Int, cause: Throwable): Unit

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

  38. def failNextNPersisted(persistenceId: String, n: Int): Unit

    Fail next n write operations for particular persistence id.

  39. def failNextNPersisted(persistenceId: String, n: Int, cause: Throwable): Unit

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

  40. def failNextNReads(persistenceId: String, n: Int): Unit

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

  41. def failNextNReads(persistenceId: String, n: Int, cause: Throwable): Unit

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

  42. def failNextNReads(n: Int): Unit

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

  43. def failNextNReads(n: Int, cause: Throwable): Unit

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

  44. def failNextPersisted(): Unit

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

  45. def failNextPersisted(cause: Throwable): Unit

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

  46. def failNextPersisted(persistenceId: String): Unit

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

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

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

  48. def failNextRead(persistenceId: String): Unit

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

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

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

  50. def failNextRead(): Unit

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

  51. def failNextRead(cause: Throwable): Unit

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

  52. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  53. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  54. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  55. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  56. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  57. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  58. def persistForRecovery(persistenceId: String, events: List[Any]): Unit

    Persist events into storage in order.

  59. def persistedInStorage(persistenceId: String): List[Any]

    Retrieve all events saved in storage by persistence id.

  60. def receivePersisted[A](persistenceId: String, n: Int, cla: Class[A], max: Duration): List[A]

    Receive for max time next n events from the storage.

  61. def receivePersisted[A](persistenceId: String, n: Int, cla: Class[A]): List[A]

    Receive next n events from the storage.

  62. def rejectNextDelete(persistenceId: String, cause: Throwable): Unit

    Reject next delete from storage operations for particular persistence id with cause exception.

  63. def rejectNextDelete(persistenceId: String): Unit

    Reject next delete from storage operations for particular persistence id with default exception.

  64. def rejectNextDelete(cause: Throwable): Unit

    Reject next delete from storage operation for any persistence id with cause exception.

  65. def rejectNextDelete(): Unit

    Reject next delete from storage operation for any persistence id with default exception.

  66. def rejectNextNDeletes(persistenceId: String, n: Int, cause: Throwable): Unit

    Reject next n delete from storage operations for particular persistence id with cause exception.

  67. def rejectNextNDeletes(persistenceId: String, n: Int): Unit

    Reject next n delete from storage operations for particular persistence id with default exception.

  68. def rejectNextNDeletes(n: Int, cause: Throwable): Unit

    Reject next n delete from storage operations for any persistence id with cause exception.

  69. def rejectNextNDeletes(n: Int): Unit

    Reject next n delete from storage operations for any persistence id with default exception.

  70. def rejectNextNOps(n: Int, cause: Throwable): Unit

    Reject n following journal operations regardless of their type.

    Reject n following journal operations regardless of their type. Rejects operations with the cause exception.

  71. def rejectNextNOps(n: Int): Unit

    Reject n following journal operations regardless of their type.

    Reject n following journal operations regardless of their type. Rejects operations with default ExpectedRejection exception.

  72. def rejectNextNOpsCond(cond: BiFunction[String, JournalOperation, Boolean], n: Int, cause: Throwable): Unit

    Reject n following journal operations depending on the condition cond.

    Reject n following journal operations depending on the condition cond. Rejection triggers, when cond returns true. Rejects operations with the cause exception.

  73. def rejectNextNOpsCond(cond: BiFunction[String, JournalOperation, Boolean], n: Int): Unit

    Reject n following journal operations depending on the condition cond.

    Reject n following journal operations depending on the condition cond. Rejection triggers, when cond returns true. Reject operations with default ExpectedRejection exception.

  74. def rejectNextNPersisted(n: Int, cause: Throwable): Unit

    Reject next n save in storage operations for any persistence id with cause exception.

  75. def rejectNextNPersisted(n: Int): Unit

    Reject next n save in storage operations for any persistence id with default exception.

  76. def rejectNextNPersisted(persistenceId: String, n: Int): Unit

    Reject next n save in storage operations for particular persistence id with default exception.

  77. def rejectNextNPersisted(persistenceId: String, n: Int, cause: Throwable): Unit

    Reject next n save in storage operations for particular persistence id with cause exception.

  78. def rejectNextNReads(persistenceId: String, n: Int, cause: Throwable): Unit

    Reject next n read from storage operations for particular persistence id with cause exception.

  79. def rejectNextNReads(persistenceId: String, n: Int): Unit

    Reject next n read from storage operations for particular persistence id with default exception.

  80. def rejectNextNReads(n: Int, cause: Throwable): Unit

    Reject next n read from storage operations for any persistence id with cause exception.

  81. def rejectNextNReads(n: Int): Unit

    Reject next n read from storage operations for any persistence id with default exception.

  82. def rejectNextPersisted(): Unit

    Reject next save in storage operation for any persistence id with default exception.

  83. def rejectNextPersisted(cause: Throwable): Unit

    Reject next save in storage operation for any persistence id with cause exception.

  84. def rejectNextPersisted(persistenceId: String, cause: Throwable): Unit

    Reject next save in storage operation for particular persistence id with cause exception.

  85. def rejectNextPersisted(persistenceId: String): Unit

    Reject next save in storage operation for particular persistence id with default exception.

  86. def rejectNextRead(persistenceId: String, cause: Throwable): Unit

    Reject next read from storage operation for particular persistence id with cause exception.

  87. def rejectNextRead(persistenceId: String): Unit

    Reject next read from storage operation for particular persistence id with default exception.

  88. def rejectNextRead(cause: Throwable): Unit

    Reject next read from storage operation for any persistence id with cause exception.

  89. def rejectNextRead(): Unit

    Reject next read from storage operation for any persistence id with default exception.

  90. def resetPolicy(): Unit

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

  91. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  92. def toString(): String
    Definition Classes
    AnyRef → Any
  93. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  94. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  95. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  96. def withPolicy(policy: EventStorage.JournalPolicies.PolicyType): PersistenceTestKit

    Set new processing policy for journal operations.

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

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated
  2. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from PersistenceTestKit toStringFormat[PersistenceTestKit] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.12.16) Use formatString.format(value) instead of value.formatted(formatString), or use the f"" string interpolator. In Java 15 and later, formatted resolves to the new method in String which has reversed parameters.

  3. def [B](y: B): (PersistenceTestKit, B)
    Implicit
    This member is added by an implicit conversion from PersistenceTestKit toArrowAssoc[PersistenceTestKit] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd fromPersistenceTestKit to any2stringadd[PersistenceTestKit]

Inherited by implicit conversion StringFormat fromPersistenceTestKit to StringFormat[PersistenceTestKit]

Inherited by implicit conversion Ensuring fromPersistenceTestKit to Ensuring[PersistenceTestKit]

Inherited by implicit conversion ArrowAssoc fromPersistenceTestKit to ArrowAssoc[PersistenceTestKit]

Ungrouped