pjfanning commented on code in PR #3644:
URL: https://github.com/apache/pekko/pull/3644#discussion_r4357999834
##########
cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ClusterShardingInternalsSpec.scala:
##########
@@ -98,10 +98,11 @@ class ClusterShardingInternalsSpec extends PekkoSpec("""
val handOffStopper = system.actorOf(
Props(new HandOffStopper(typeName, shard, probe.ref,
Set(emptyHandlerActor), HandOffStopMessage, 10.millis)))
+ // the entity stop timeout is at least 1 second
Review Comment:
Added `HandOffStopperSpec` in 4353dd08bf. It drives the timers with
`ExplicitlyTriggeredScheduler` and checks the published warnings:
- With a 20s hand-off-timeout, the 5s warning must say `Waiting additional
[10 seconds]`, and the entities must be stopped after 15s.
- With a 6s hand-off-timeout, the stop timeout fires after 1s. The entity
blocks in `postStop`, so the stopper is still running when the 5s warning would
be due, and no warning may be logged.
Against the old `HandOffStopper`, both tests fail. With only
`timers.cancel(StopTimeoutWarning)` removed, the second fails and the leaked
warning says `Waiting additional [-4 seconds]`. I kept the widened waits in
`ClusterShardingInternalsSpec`, since the stop timeout is now at least 1s. The
branch is also rebased onto main.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]