Should be pointed to RTFM. There is a method `forMax` that can set 
different timeout for particular state changes. I knew I'm missing 
something.
Now I have different problem: how can I test that timeout occur with 
PersistentFSM? I can't use TestFSMRef because it's not FSM, it's 
PersistentFSM (not extends akka.actor.FSM), I should use Asynchronous 
Testing: TestKit 
<https://doc.akka.io/docs/akka/2.5/scala/testing.html#async-integration-testing>
 and 
I can't rely on expectMsgClass(classOf[PersistentFSM.TimeoutMarker]) 
because PersistentFSM.TimeoutMarker is private[persistence].

Maybe anyone have already solved it?

On Thursday, November 2, 2017 at 1:43:30 PM UTC+2, Alexandr Sova wrote:
>
> Yeah, I'm doing such thing at system.dispatcher.scheduleOnce but if I'd 
> use this at when(state, duration) wouldn't duration be computed only at 
> Actor start/creation? Even lazy may not be helpful because it'll compute 
> only once and will return the same value again and again.
>
> On Thursday, November 2, 2017 at 5:44:55 AM UTC+2, Christopher Hunt wrote:
>>
>> Perhaps something like this in order to get your FiniteDuration:
>>
>> Duration.ofMillis(
>>   ChronoUnit.MILLIS.between(
>>     ZonedDateTime.parse("2007-12-03T10:15:30+01:00[Europe/Paris]"), 
>>     ZonedDateTime.now
>>   )
>> )
>>
>>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to