Package akka.persistence.journal
Class JournalSpec
- java.lang.Object
- 
- akka.persistence.PluginSpec
- 
- akka.persistence.journal.JournalSpec
 
 
- 
- All Implemented Interfaces:
- CapabilityFlags,- JournalCapabilityFlags,- MayVerb,- OptionalTests,- TestKitBase,- java.io.Serializable,- org.scalactic.Explicitly,- org.scalactic.Tolerance,- org.scalactic.TripleEquals,- org.scalactic.TripleEqualsSupport,- org.scalatest.Alerting,- org.scalatest.Assertions,- org.scalatest.BeforeAndAfterAll,- org.scalatest.BeforeAndAfterEach,- org.scalatest.Documenting,- org.scalatest.Informing,- org.scalatest.matchers.dsl.MatcherWords,- org.scalatest.matchers.should.Matchers,- org.scalatest.Notifying,- org.scalatest.Suite,- org.scalatest.SuiteMixin,- org.scalatest.TestRegistration,- org.scalatest.TestSuite,- org.scalatest.verbs.CanVerb,- org.scalatest.verbs.MustVerb,- org.scalatest.verbs.ShouldVerb,- org.scalatest.wordspec.AnyWordSpecLike
 - Direct Known Subclasses:
- JavaJournalSpec,- JournalPerfSpec
 
 public abstract class JournalSpec extends PluginSpec implements MayVerb, OptionalTests, JournalCapabilityFlags This spec aims to verify custom akka-persistence Journal implementations. Plugin authors are highly encouraged to include it in their plugin's test suites.In case your journal plugin needs some kind of setup or teardown, override the beforeAllorafterAllmethods (don't forget to callsuperin your overridden methods).For a Java and JUnit consumable version of the TCK please refer to JavaJournalSpec.- See Also:
- JournalPerfSpec,- JavaJournalPerfSpec, Serialized Form
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.scalatest.wordspec.AnyWordSpecLikeorg.scalatest.wordspec.AnyWordSpecLike.AfterWord, org.scalatest.wordspec.AnyWordSpecLike.ItWord, org.scalatest.wordspec.AnyWordSpecLike.ResultOfTaggedAsInvocationOnString, org.scalatest.wordspec.AnyWordSpecLike.TheyWord, org.scalatest.wordspec.AnyWordSpecLike.WordSpecStringWrapper
 - 
Nested classes/interfaces inherited from interface org.scalatest.Assertionsorg.scalatest.Assertions.AssertionsHelper
 - 
Nested classes/interfaces inherited from interface org.scalatest.verbs.CanVerborg.scalatest.verbs.CanVerb.StringCanWrapperForVerb
 - 
Nested classes/interfaces inherited from interface org.scalactic.Explicitlyorg.scalactic.Explicitly.DecidedByEquality<A extends java.lang.Object>, org.scalactic.Explicitly.DecidedWord, org.scalactic.Explicitly.DeterminedByEquivalence<T extends java.lang.Object>, org.scalactic.Explicitly.DeterminedWord, org.scalactic.Explicitly.TheAfterWord
 - 
Nested classes/interfaces inherited from interface org.scalatest.matchers.should.Matchersorg.scalatest.matchers.should.Matchers.AnWord, org.scalatest.matchers.should.Matchers.AnyShouldWrapper<T extends java.lang.Object>, org.scalatest.matchers.should.Matchers.AWord, org.scalatest.matchers.should.Matchers.Collected, org.scalatest.matchers.should.Matchers.HavePropertyMatcherGenerator, org.scalatest.matchers.should.Matchers.KeyWord, org.scalatest.matchers.should.Matchers.RegexWord, org.scalatest.matchers.should.Matchers.RegexWrapper, org.scalatest.matchers.should.Matchers.ResultOfBeWordForAny<T extends java.lang.Object>, org.scalatest.matchers.should.Matchers.ResultOfBeWordForCollectedAny<T extends java.lang.Object>, org.scalatest.matchers.should.Matchers.ResultOfBeWordForCollectedArray<T extends java.lang.Object>, org.scalatest.matchers.should.Matchers.ResultOfCollectedAny<T extends java.lang.Object>, org.scalatest.matchers.should.Matchers.ResultOfContainWordForCollectedAny<T extends java.lang.Object>, org.scalatest.matchers.should.Matchers.ResultOfEndWithWordForCollectedString, org.scalatest.matchers.should.Matchers.ResultOfEndWithWordForString, org.scalatest.matchers.should.Matchers.ResultOfFullyMatchWordForCollectedString, org.scalatest.matchers.should.Matchers.ResultOfFullyMatchWordForString, org.scalatest.matchers.should.Matchers.ResultOfHaveWordForCollectedExtent<A extends java.lang.Object>, org.scalatest.matchers.should.Matchers.ResultOfHaveWordForExtent<A extends java.lang.Object>, org.scalatest.matchers.should.Matchers.ResultOfIncludeWordForCollectedString, org.scalatest.matchers.should.Matchers.ResultOfIncludeWordForString, org.scalatest.matchers.should.Matchers.ResultOfNotWordForCollectedAny<T extends java.lang.Object>, org.scalatest.matchers.should.Matchers.ResultOfStartWithWordForCollectedString, org.scalatest.matchers.should.Matchers.ResultOfStartWithWordForString, org.scalatest.matchers.should.Matchers.StringShouldWrapper, org.scalatest.matchers.should.Matchers.TheSameInstanceAsPhrase, org.scalatest.matchers.should.Matchers.ValueWord
 - 
Nested classes/interfaces inherited from interface akka.persistence.scalatest.MayVerbMayVerb.StringMayWrapperForVerb, MayVerb.TestCanceledByFailure, MayVerb.TestCanceledByFailure$
 - 
Nested classes/interfaces inherited from interface org.scalatest.verbs.MustVerborg.scalatest.verbs.MustVerb.StringMustWrapperForVerb
 - 
Nested classes/interfaces inherited from interface org.scalatest.verbs.ShouldVerborg.scalatest.verbs.ShouldVerb.StringShouldWrapperForVerb
 - 
Nested classes/interfaces inherited from interface org.scalatest.TestSuiteorg.scalatest.TestSuite.NoArgTest, org.scalatest.TestSuite.NoArgTest$
 - 
Nested classes/interfaces inherited from interface org.scalactic.Toleranceorg.scalactic.Tolerance.PlusOrMinusWrapper<T extends java.lang.Object>
 - 
Nested classes/interfaces inherited from interface org.scalactic.TripleEqualsSupportorg.scalactic.TripleEqualsSupport.AToBEquivalenceConstraint<A extends java.lang.Object,B extends java.lang.Object>, org.scalactic.TripleEqualsSupport.BToAEquivalenceConstraint<A extends java.lang.Object,B extends java.lang.Object>, org.scalactic.TripleEqualsSupport.CheckingEqualizer<L extends java.lang.Object>, org.scalactic.TripleEqualsSupport.EqualityConstraint<A extends java.lang.Object,B extends java.lang.Object>, org.scalactic.TripleEqualsSupport.Equalizer<L extends java.lang.Object>, org.scalactic.TripleEqualsSupport.Spread<T extends java.lang.Object>, org.scalactic.TripleEqualsSupport.Spread$, org.scalactic.TripleEqualsSupport.TripleEqualsInvocation<T extends java.lang.Object>, org.scalactic.TripleEqualsSupport.TripleEqualsInvocation$, org.scalactic.TripleEqualsSupport.TripleEqualsInvocationOnSpread<T extends java.lang.Object>, org.scalactic.TripleEqualsSupport.TripleEqualsInvocationOnSpread$
 
- 
 - 
Constructor SummaryConstructors Constructor Description JournalSpec(com.typesafe.config.Config config)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidbeforeEach()static com.typesafe.config.Configconfig()ActorRefjournal()voidpreparePersistenceId(java.lang.String pid)Overridable hook that is called before populating the journal for the next test case.JournalProtocol.ReplayedMessagereplayedMessage(long snr, boolean deleted)booleanreplayedMessage$default$2()booleansupportsAtomicPersistAllOfSeveralEvents()Implementation may override and return false if it does not support atomic writes of several events, as emitted bypersistAll.protected CapabilityFlagsupportsMetadata()Whentrueenables tests which check if the Journal stores and returns metadata for an eventprotected CapabilityFlagsupportsReplayOnlyLast()Whentrueenables tests which check if the Journal can replay only the last event.protected CapabilityFlagsupportsSerialization()Whentrueenables tests which check if the Journal properly serialize and deserialize events.ActorSystemsystem()voidwriteMessages(int fromSnr, int toSnr, java.lang.String pid, ActorRef sender, java.lang.String writerUuid)- 
Methods inherited from class akka.persistence.PluginSpeca, actorInstanceId, after, afterAll, an, be, beforeAll, behave, compile, config, contain, decided, defined, determined, empty, endWith, exist, extension, fullyMatch, have, include, invokeBeforeAllAndAfterAllEvenIfNoTestsAreExpected, it, key, length, matchPattern, NoArgTest, not, org$scalactic$Explicitly$_setter_$after_$eq, org$scalactic$Explicitly$_setter_$decided_$eq, org$scalactic$Explicitly$_setter_$determined_$eq, org$scalatest$Assertions$_setter_$succeed_$eq, org$scalatest$BeforeAndAfterAll$_setter_$invokeBeforeAllAndAfterAllEvenIfNoTestsAreExpected_$eq, org$scalatest$matchers$dsl$MatcherWords$_setter_$be_$eq, org$scalatest$matchers$dsl$MatcherWords$_setter_$compile_$eq, org$scalatest$matchers$dsl$MatcherWords$_setter_$contain_$eq, org$scalatest$matchers$dsl$MatcherWords$_setter_$defined_$eq, org$scalatest$matchers$dsl$MatcherWords$_setter_$empty_$eq, org$scalatest$matchers$dsl$MatcherWords$_setter_$endWith_$eq, org$scalatest$matchers$dsl$MatcherWords$_setter_$exist_$eq, org$scalatest$matchers$dsl$MatcherWords$_setter_$fullyMatch_$eq, org$scalatest$matchers$dsl$MatcherWords$_setter_$have_$eq, org$scalatest$matchers$dsl$MatcherWords$_setter_$include_$eq, org$scalatest$matchers$dsl$MatcherWords$_setter_$length_$eq, org$scalatest$matchers$dsl$MatcherWords$_setter_$matchPattern_$eq, org$scalatest$matchers$dsl$MatcherWords$_setter_$not_$eq, org$scalatest$matchers$dsl$MatcherWords$_setter_$readable_$eq, org$scalatest$matchers$dsl$MatcherWords$_setter_$size_$eq, org$scalatest$matchers$dsl$MatcherWords$_setter_$sorted_$eq, org$scalatest$matchers$dsl$MatcherWords$_setter_$startWith_$eq, org$scalatest$matchers$dsl$MatcherWords$_setter_$typeCheck_$eq, org$scalatest$matchers$dsl$MatcherWords$_setter_$writable_$eq, org$scalatest$matchers$should$Matchers$_setter_$a_$eq, org$scalatest$matchers$should$Matchers$_setter_$an_$eq, org$scalatest$matchers$should$Matchers$_setter_$key_$eq, org$scalatest$matchers$should$Matchers$_setter_$regex_$eq, org$scalatest$matchers$should$Matchers$_setter_$theSameInstanceAs_$eq, org$scalatest$matchers$should$Matchers$_setter_$value_$eq, org$scalatest$Suite$_setter_$styleName_$eq, org$scalatest$wordspec$AnyWordSpecLike$_setter_$behave_$eq, org$scalatest$wordspec$AnyWordSpecLike$_setter_$it_$eq, org$scalatest$wordspec$AnyWordSpecLike$_setter_$stackDepth_$eq, org$scalatest$wordspec$AnyWordSpecLike$_setter_$styleName_$eq, org$scalatest$wordspec$AnyWordSpecLike$_setter_$subjectRegistrationFunction_$eq, org$scalatest$wordspec$AnyWordSpecLike$_setter_$subjectWithAfterWordRegistrationFunction_$eq, org$scalatest$wordspec$AnyWordSpecLike$_setter_$they_$eq, pid, readable, regex, size, sorted, startWith, styleName, subjectRegistrationFunction, subjectWithAfterWordRegistrationFunction, subscribe, succeed, testActor, theSameInstanceAs, they, typeCheck, value, writable, writerUuid
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.scalatest.wordspec.AnyWordSpecLikeafterWord, alert, convertToWordSpecStringWrapper, info, markup, note, org$scalatest$wordspec$AnyWordSpecLike$_setter_$org$scalatest$wordspec$AnyWordSpecLike$$engine_$eq, org$scalatest$wordspec$AnyWordSpecLike$$engine, org$scalatest$wordspec$AnyWordSpecLike$$registerBranch, org$scalatest$wordspec$AnyWordSpecLike$$registerShorthandBranch, org$scalatest$wordspec$AnyWordSpecLike$$registerTestToIgnore, org$scalatest$wordspec$AnyWordSpecLike$$registerTestToRun, registerIgnoredTest, registerTest, run, runTest, runTests, tags, testDataFor, testDataFor$default$2, testNames
 - 
Methods inherited from interface org.scalatest.AssertionsassertResult, assertResult, assertThrows, cancel, cancel, cancel, cancel, fail, fail, fail, fail, intercept, newAssertionFailedException, newTestCanceledException, pending, pendingUntilFixed, withClue
 - 
Methods inherited from interface akka.persistence.JournalCapabilityFlagssupportsRejectingNonSerializableObjects
 - 
Methods inherited from interface org.scalatest.matchers.should.Matchers$greater, $greater$eq, $less, $less$eq, a, all, all, all, all, allElementsOf, allOf, an, atLeast, atLeast, atLeast, atLeast, atLeastOneElementOf, atLeastOneOf, atMost, atMost, atMost, atMost, atMostOneElementOf, atMostOneOf, between, between, between, convertSymbolToHavePropertyMatcherGenerator, convertToAnyShouldWrapper, convertToRegexWrapper, convertToStringShouldWrapper, definedAt, doCollected, equal, equal, every, every, every, every, exactly, exactly, exactly, exactly, inOrder, inOrderElementsOf, inOrderOnly, message, no, no, no, noElementsOf, noneOf, of, oneElementOf, oneOf, only, org$scalatest$matchers$should$Matchers$_setter_$org$scalatest$matchers$should$Matchers$$AllCollected_$eq, org$scalatest$matchers$should$Matchers$_setter_$org$scalatest$matchers$should$Matchers$$EveryCollected_$eq, org$scalatest$matchers$should$Matchers$_setter_$org$scalatest$matchers$should$Matchers$$NoCollected_$eq, org$scalatest$matchers$should$Matchers$_setter_$org$scalatest$matchers$should$Matchers$$ShouldMethodHelper_$eq, org$scalatest$matchers$should$Matchers$$AllCollected, org$scalatest$matchers$should$Matchers$$AtLeastCollected, org$scalatest$matchers$should$Matchers$$AtMostCollected, org$scalatest$matchers$should$Matchers$$BetweenCollected, org$scalatest$matchers$should$Matchers$$EveryCollected, org$scalatest$matchers$should$Matchers$$ExactlyCollected, org$scalatest$matchers$should$Matchers$$NoCollected, org$scalatest$matchers$should$Matchers$$ShouldMethodHelper, the, theSameElementsAs, theSameElementsInOrderAs, thrownBy
 - 
Methods inherited from interface akka.persistence.scalatest.MayVerbconvertToStringMayWrapper, mayVerbStacktraceContextFrames, optional
 - 
Methods inherited from interface akka.persistence.scalatest.OptionalTestsoptional
 - 
Methods inherited from interface org.scalatest.SuitecreateCatchReporter, execute, execute$default$1, execute$default$2, execute$default$3, execute$default$4, execute$default$5, execute$default$6, execute$default$7, expectedTestCount, nestedSuites, rerunner, runNestedSuites, suiteId, suiteName
 - 
Methods inherited from interface org.scalatest.SuiteMixinexpectedTestCount, nestedSuites, rerunner, runNestedSuites, runTests, suiteId, suiteName, tags, testDataFor, testNames
 - 
Methods inherited from interface akka.testkit.TestKitBaseassertForDuration, assertForDuration$default$3, awaitAssert, awaitAssert$default$2, awaitAssert$default$3, awaitCond, awaitCond$default$2, awaitCond$default$3, awaitCond$default$4, checkMissingAndUnexpected, childActorOf, childActorOf, childActorOf, childActorOf, end_$eq, expectMsg, expectMsg, expectMsg, expectMsg_internal, expectMsg_internal$default$3, expectMsgAllClassOf, expectMsgAllClassOf, expectMsgAllConformingOf, expectMsgAllConformingOf, expectMsgAllOf, expectMsgAllOf, expectMsgAllOf_internal, expectMsgAnyClassOf, expectMsgAnyClassOf, expectMsgAnyClassOf_internal, expectMsgAnyOf, expectMsgAnyOf, expectMsgAnyOf_internal, expectMsgClass, expectMsgClass, expectMsgClass_internal, expectMsgPF, expectMsgPF$default$1, expectMsgPF$default$2, expectMsgType, expectMsgType, expectNoMessage, expectNoMessage, expectNoMsg_internal, expectTerminated, expectTerminated$default$2, fishForMessage, fishForMessage$default$1, fishForMessage$default$2, fishForSpecificMessage, fishForSpecificMessage$default$1, fishForSpecificMessage$default$2, format, ignoreMsg, ignoreNoMsg, internalExpectMsgAllClassOf, internalExpectMsgAllConformingOf, lastSender, lastWasNoMsg_$eq, msgAvailable, now, receiveN, receiveN, receiveN_internal, receiveOne, receiveWhile, receiveWhile$default$1, receiveWhile$default$2, receiveWhile$default$3, remaining, remainingOr, remainingOrDefault, remainingOrDilated, setAutoPilot, shutdown, shutdown$default$1, shutdown$default$2, shutdown$default$3, testActorName, testKitSettings, unwatch, watch, within, within
 - 
Methods inherited from interface org.scalactic.TripleEqualsconversionCheckedConstraint, convertEquivalenceToAToBConstraint, convertEquivalenceToAToBConversionConstraint, convertEquivalenceToBToAConstraint, convertEquivalenceToBToAConversionConstraint, convertToCheckingEqualizer, convertToEqualizer, lowPriorityConversionCheckedConstraint, lowPriorityTypeCheckedConstraint, typeCheckedConstraint, unconstrainedEquality
 
- 
 
- 
- 
- 
Method Detail- 
configpublic static com.typesafe.config.Config config() 
 - 
systempublic ActorSystem system() - Specified by:
- systemin interface- TestKitBase
 
 - 
supportsSerializationprotected CapabilityFlag supportsSerialization() Description copied from interface:JournalCapabilityFlagsWhentrueenables tests which check if the Journal properly serialize and deserialize events.- Specified by:
- supportsSerializationin interface- JournalCapabilityFlags
 
 - 
supportsMetadataprotected CapabilityFlag supportsMetadata() Description copied from interface:JournalCapabilityFlagsWhentrueenables tests which check if the Journal stores and returns metadata for an event- Specified by:
- supportsMetadatain interface- JournalCapabilityFlags
 
 - 
supportsReplayOnlyLastprotected CapabilityFlag supportsReplayOnlyLast() Description copied from interface:JournalCapabilityFlagsWhentrueenables tests which check if the Journal can replay only the last event.- Specified by:
- supportsReplayOnlyLastin interface- JournalCapabilityFlags
 
 - 
beforeEachprotected void beforeEach() - Specified by:
- beforeEachin interface- org.scalatest.BeforeAndAfterEach
- Overrides:
- beforeEachin class- PluginSpec
 
 - 
preparePersistenceIdpublic void preparePersistenceId(java.lang.String pid) Overridable hook that is called before populating the journal for the next test case.pidis thepersistenceIdthat will be used in the test. This method may be needed to clean pre-existing events from the log.
 - 
supportsAtomicPersistAllOfSeveralEventspublic boolean supportsAtomicPersistAllOfSeveralEvents() Implementation may override and return false if it does not support atomic writes of several events, as emitted bypersistAll.
 - 
journalpublic ActorRef journal() 
 - 
replayedMessagepublic JournalProtocol.ReplayedMessage replayedMessage(long snr, boolean deleted) 
 - 
replayedMessage$default$2public boolean replayedMessage$default$2() 
 - 
writeMessagespublic void writeMessages(int fromSnr, int toSnr, java.lang.String pid, ActorRef sender, java.lang.String writerUuid)
 
- 
 
-