Minor fixes in tests and documentation (#30440)

This commit is contained in:
Debasish Ghosh 2021-07-28 16:02:03 +05:30 committed by GitHub
parent 8e932ede37
commit 420b52e6be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 12 deletions

View file

@ -35,7 +35,7 @@ durable state is stored in a database and fetched as an asynchronous stream to t
durable state, provided by the `DurableStateStoreQuery` interface, is used to implement tag based searches in
Akka Projections.
The example below shows how to get the `DurableStateStoreQuery` from the DurableStateStoreRegistry extension.
The example below shows how to get the `DurableStateStoreQuery` from the `DurableStateStoreRegistry` extension.
Scala
: @@snip [DurableStateStoreQueryUsageCompileOnlySpec.scala](/akka-cluster-sharding-typed/src/test/scala/docs/akka/cluster/sharding/typed/DurableStateStoreQueryUsageCompileOnlySpec.scala) { #get-durable-state-store-query-example }

View file

@ -80,7 +80,7 @@ class DurableStateBehaviorReplySpec
"A typed persistent actor with commands that are expecting replies" must {
"persist an event thenReply" in {
"persist state thenReply" in {
val c = spawn(counter(nextPid()))
val probe = TestProbe[Done]()
c ! IncrementWithConfirmation(probe.ref)
@ -92,7 +92,7 @@ class DurableStateBehaviorReplySpec
probe.expectMessage(Done)
}
"persist an event thenReply later" in {
"persist state thenReply later" in {
val c = spawn(counter(nextPid()))
val probe = TestProbe[Done]()
c ! IncrementReplyLater(probe.ref)

View file

@ -42,7 +42,7 @@ class NullEmptyStateSpec
})
"A typed persistent actor with primitive state" must {
"persist events and update state" in {
"persist and update state" in {
val probe = TestProbe[String]()
val b = primitiveState(PersistenceId.ofUniqueId("a"), probe.ref)
val ref1 = spawn(b)
@ -54,7 +54,6 @@ class NullEmptyStateSpec
probe.expectTerminated(ref1)
val _ = spawn(b)
// no events, no replay and hence no messages
probe.expectNoMessage()
}
}

View file

@ -4,10 +4,6 @@
package akka.persistence.typed.state.scaladsl
/*
* Copyright (C) 2018-2021 Lightbend Inc. <https://www.lightbend.com>
*/
import akka.actor.testkit.typed.scaladsl._
import akka.actor.typed.ActorRef
import akka.actor.typed.Behavior
@ -39,7 +35,7 @@ class PrimitiveStateSpec
})
"A typed persistent actor with primitive state" must {
"persist primitive events and update state" in {
"persist primitive state and update" in {
val probe = TestProbe[String]()
val b = primitiveState(PersistenceId.ofUniqueId("a"), probe.ref)
val ref1 = spawn(b)
@ -52,11 +48,9 @@ class PrimitiveStateSpec
probe.expectTerminated(ref1)
val ref2 = spawn(b)
// no events, no replay and hence no messages
probe.expectNoMessage()
ref2 ! 3
probe.expectMessage("3")
}
}
}