Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
package akka.cluster.sharding

import scala.concurrent.duration._

import com.typesafe.config.ConfigFactory

import akka.actor.{ Actor, ActorLogging, ActorRef, PoisonPill, Props }
import akka.cluster.Cluster
import akka.cluster.sharding.ShardRegion.Passivate
import akka.pattern.{ BackoffOpts, BackoffSupervisor }
import akka.testkit.EventFilter
import akka.testkit.WithLogCapturing
import akka.testkit.{ AkkaSpec, ImplicitSender }

Expand Down Expand Up @@ -98,8 +97,12 @@ class DeprecatedSupervisionSpec extends AkkaSpec(SupervisionSpec.config) with Im
val response = expectMsgType[Response](5.seconds)
watch(response.self)

region ! Msg(10, "passivate")
expectTerminated(response.self)
// We need the shard to have observed the passivation for this test but
// we don't know that this means the passivation reached the shard yet unless we observe it
EventFilter.debug("passy: Passivation started for [10]", occurrences = 1).intercept {
region ! Msg(10, "passivate")
expectTerminated(response.self)
}

// This would fail before as sharded actor would be stuck passivating
region ! Msg(10, "hello")
Expand Down