Merge pull request #25344 from akka/wip-25342-ReplicatorDeltaSpec-patriknw
Harden ReplicatorDeltaSpec, #25342
This commit is contained in:
commit
d330c61203
2 changed files with 8 additions and 0 deletions
|
|
@ -847,6 +847,7 @@ object Replicator {
|
|||
override def zero: DeltaReplicatedData = this
|
||||
override def delta: Option[ReplicatedDelta] = None
|
||||
override def resetDelta: ReplicatedData = this
|
||||
override def toString: String = "NoDeltaPlaceholder"
|
||||
}
|
||||
}
|
||||
case object DeltaNack extends ReplicatorMessage with DeadLetterSuppression
|
||||
|
|
|
|||
|
|
@ -331,6 +331,13 @@ class ReplicatorDeltaSpec extends MultiNodeSpec(ReplicatorDeltaSpec) with STMult
|
|||
// Thereafter delta can be propagated and applied again.
|
||||
deltaReplicator.tell(Update(KeyHigh, Highest(0), writeAll)(_.incr(100)), p1.ref)
|
||||
p1.expectMsgType[UpdateSuccess[_]]
|
||||
// Flush the deltaPropagation buffer, otherwise it will contain
|
||||
// NoDeltaPlaceholder from previous updates and the incr(4) delta will also
|
||||
// be folded into NoDeltaPlaceholder and not propagated as delta. A few DeltaPropagationTick
|
||||
// are needed to send to all and flush buffer.
|
||||
roles.foreach { _ ⇒
|
||||
deltaReplicator ! Replicator.Internal.DeltaPropagationTick
|
||||
}
|
||||
deltaReplicator.tell(Update(KeyHigh, Highest(0), WriteLocal)(_.incr(4)), p1.ref)
|
||||
p1.expectMsgType[UpdateSuccess[_]]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue