Re: [akka-user] Testing PersistentActor, receiveCommand is never called (Akka 2.3.4)

2014-07-21 Thread Konrad Malawski
Ticket about testkit created: https://github.com/akka/akka/issues/15571 Feel free to share need's and nice-to-have's there. On Mon, Jul 21, 2014 at 9:50 AM, Carsten Saathoff wrote: > Am Sonntag, 20. Juli 2014 16:14:53 UTC+2 schrieb Konrad Malawski: > >> By the way, we are thinking of offering a

Re: [akka-user] Testing PersistentActor, receiveCommand is never called (Akka 2.3.4)

2014-07-21 Thread Carsten Saathoff
Am Sonntag, 20. Juli 2014 16:14:53 UTC+2 schrieb Konrad Malawski: > > By the way, we are thinking of offering a TestKit for akka-persistence. > I think it would be a neat addition (would make prepping journal state > before your tests easier) but we have not discussed it in detail yet, let > me k

Re: [akka-user] Testing PersistentActor, receiveCommand is never called (Akka 2.3.4)

2014-07-20 Thread Konrad Malawski
My pleasure! Feel free to ask any follow up questions :-) Happy hakking! On Sun, Jul 20, 2014 at 7:42 PM, Yann Le Moigne wrote: > Hi Konrad > > Yes it help ! > Thank you. > > For my first incursion in akka community, you was very helpfull and > reactive. > Thanks :) > > Le dimanche 20 juillet

Re: [akka-user] Testing PersistentActor, receiveCommand is never called (Akka 2.3.4)

2014-07-20 Thread Yann Le Moigne
Hi Konrad Yes it help ! Thank you. For my first incursion in akka community, you was very helpfull and reactive. Thanks :) Le dimanche 20 juillet 2014 18:42:12 UTC+2, Konrad Malawski a écrit : > > Without modifying the tested actor you could test (1) by sending an > Idenfity message to the sel

Re: [akka-user] Testing PersistentActor, receiveCommand is never called (Akka 2.3.4)

2014-07-20 Thread Konrad Malawski
Without modifying the tested actor you could test (1) by sending an Idenfity message to the selection (testedGuy/*), and then expect exactly one ActorIdentity as response (expect it, and then expectNoMsg). I hope this helps! ​ On Sun, Jul 20, 2014 at 4:31 PM, Yann Le Moigne wrote: > I'm begin

Re: [akka-user] Testing PersistentActor, receiveCommand is never called (Akka 2.3.4)

2014-07-20 Thread Yann Le Moigne
I'm beginning, so nu much insight to make a whish at this time ; but of course, managed test & journal lifecycle by specialized TestKit sound great. I'm trying to switch to standard testing style, but I can't find a way to replace : 1: assert(actorRef.underlyingActor.context.children.size === 1)

Re: [akka-user] Testing PersistentActor, receiveCommand is never called (Akka 2.3.4)

2014-07-20 Thread Konrad 'ktoso' Malawski
Yes, I agree this should be mentioned explicitly - I have created this issue to track this: https://github.com/akka/akka/issues/15569 By the way, we are thinking of offering a TestKit for akka-persistence. I think it would be a neat addition (would make prepping journal state before your tests e

Re: [akka-user] Testing PersistentActor, receiveCommand is never called (Akka 2.3.4)

2014-07-20 Thread Yann Le Moigne
Ho, OK. Maybe this should be explicitly added to documentation ? Thanks for the answer. Le dimanche 20 juillet 2014 15:46:02 UTC+2, Konrad Malawski a écrit : > > Hi Yann, > TestActorRef is not compatible with Akka persistence. We discussed this in > this issue here: https://github.com/akka/akka

Re: [akka-user] Testing PersistentActor, receiveCommand is never called (Akka 2.3.4)

2014-07-20 Thread Konrad Malawski
Hi Yann, TestActorRef is not compatible with Akka persistence. We discussed this in this issue here: https://github.com/akka/akka/issues/15293 Please use traditional testing style with persistence (as in expect messages etc). -- Konrad 'ktoso' Malawski (Sent from my phone) On 20 Jul 2014 15:23,

[akka-user] Testing PersistentActor, receiveCommand is never called (Akka 2.3.4)

2014-07-20 Thread Yann Le Moigne
Hi, I'm trying to test a persistent actor class ServerManager extends PersistentActor { override def persistenceId = "ServerManager" override def receiveRecover: Receive = { case _ => } override def receiveCommand: Receive = { case Commands.Server.Watch(address) => persist(Event