Re: [akka-user] Timing of eventsByTag() and persist()

2016-11-17 Thread Patrik Nordwall
Sounds like you need to ping the maintainers of akka-persistence-inmemory

/Patrik

On Wed, Nov 16, 2016 at 2:13 AM, Richard Rodseth  wrote:

> We are seeing some baffling behaviour in a unit test (using
> akka-persistence-inmemory).
>
> The test starts actor A and actor B (which starts a stream using
> eventsByTag in its
> RecoveryCompleted handler).
> The test then sends commands to actor A, which results in appropriately
> tagged events being persisted.
>
> Without going into all details, the assertion is based on a receiveN on a
> probe.
>
> What we see is that some elements at the beginning of the stream get
> missed and the assertion fails.
>
> We can make it pass by sending a message to actor A immediately after
> starting it, or by putting a Thread.sleep at that point.
>
> To add to the mystery, the test passes when run on its own, but fails when
> run with others. That made us suspect issues with
> akka-persistence-inmemory, but we do take steps to clean up the event
> store, and logging of the stream elements persuaded us that was not the
> issue.
>
>
>
>
>
>
>
> --
> >> 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 akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Patrik Nordwall
Akka Tech Lead
Lightbend  -  Reactive apps on the JVM
Twitter: @patriknw

-- 
>>  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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Timing of eventsByTag() and persist()

2016-11-15 Thread Richard Rodseth
We are seeing some baffling behaviour in a unit test (using
akka-persistence-inmemory).

The test starts actor A and actor B (which starts a stream using
eventsByTag in its
RecoveryCompleted handler).
The test then sends commands to actor A, which results in appropriately
tagged events being persisted.

Without going into all details, the assertion is based on a receiveN on a
probe.

What we see is that some elements at the beginning of the stream get missed
and the assertion fails.

We can make it pass by sending a message to actor A immediately after
starting it, or by putting a Thread.sleep at that point.

To add to the mystery, the test passes when run on its own, but fails when
run with others. That made us suspect issues with
akka-persistence-inmemory, but we do take steps to clean up the event
store, and logging of the stream elements persuaded us that was not the
issue.

-- 
>>  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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.