Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Oct 13 14:40
    cptjazz synchronize #3974
  • Oct 13 14:07
    cptjazz opened #3974
  • Oct 13 08:30
    ismaelhamed commented #3937
  • Oct 12 15:50
    IrvinDominin opened #127
  • Oct 11 18:21
    Aaronontheweb commented #3973
  • Oct 11 18:20
    Aaronontheweb commented #3937
  • Oct 11 18:16
    Zetanova commented #3937
  • Oct 11 18:11
    Zetanova commented #3937
  • Oct 11 15:09
    Aaronontheweb commented #3937
  • Oct 11 15:08
    Aaronontheweb commented #3937
  • Oct 11 14:36
    Aaronontheweb commented #3973
  • Oct 11 01:00
    Horusiath commented #3057
  • Oct 10 20:02
    IgorFedchenko synchronize #3973
  • Oct 10 19:59
    IgorFedchenko synchronize #3973
  • Oct 10 19:58
    IgorFedchenko commented #3973
  • Oct 10 19:53
    IgorFedchenko opened #3973
  • Oct 10 14:04
    stijnherreman commented #3057
  • Oct 10 13:54
    Aaronontheweb commented #3970
  • Oct 10 13:54
    Aaronontheweb synchronize #3970
  • Oct 10 10:10
    Zetanova commented #3937
Daniel Söderberg
@raskolnikoov
I just want to check that it gets a certain message
Maxim Cherednik
@maxcherednik
then there is something wrong in general
what about the very simple scenario ?
Daniel Söderberg
@raskolnikoov
that dosent work
Maxim Cherednik
@maxcherednik
like one actor - you send ping, it responds pong and you expect this pong on the test actor ?
Daniel Söderberg
@raskolnikoov
let me upload an example
how can I test this example with valid result :)
Maxim Cherednik
@maxcherednik
ok, like I thought it's not that simple then

so when you are here:

Receive<MessageFromB>(msg =>
{
//test if this happends in here!
});

you don't send it back to the original caller, right ?
Daniel Söderberg
@raskolnikoov
no that's the end
so I would like to check that this end occurs
Maxim Cherednik
@maxcherednik
in this case you can't test this
Daniel Söderberg
@raskolnikoov
daaaaaaaaam
:P
that's something you want tested :)
Maxim Cherednik
@maxcherednik
from the same article I sent
"How do I test a parent/child relationship?"
check it
actually it's not exactly this...
nevermind
I think you should test something else
give me a sec
Daniel Söderberg
@raskolnikoov
hehe and get a cup of coffee :)
brbr!
Daniel Söderberg
@raskolnikoov
back @maxcherednik
Maxim Cherednik
@maxcherednik
have a look at this guy
in there I have a similar situation
I've got this main actor: WidgetManagerActor
and when it starts it sends a message to itself, which does some complicated logic of sending messages to someone else and having responses back
I am not sure if it's easy to comprehend
check this one for instance: WhenWidgetConfigurationProviderFailsShouldRetry
or this one: InitWidgetManagerActorWithSeveralWidgets
Maxim Cherednik
@maxcherednik
so the idea is that you send a message to the child actor and you should be prepared that it will never reply....
in this case you need to have backup logic of retry...
do you follow? :)
Daniel Söderberg
@raskolnikoov
yes I follow
Maxim Cherednik
@maxcherednik
for instance in my WidgetManagerActor I am injecting the actor, so it's not exactly a child.... but I need it this way.... in you case you can have a Props param from the constructor....
in the prod code - you set the real child actor's props, in the test code you have a props of the TestProbe
Daniel Söderberg
@raskolnikoov
yes.. but I will have to rewrite my test case for this. Thanks for the help! :)
Maxim Cherednik
@maxcherednik
you will probably need to rewrite lots of things :)
but anyhow... try it... other than this, I don't know how to handle this
Daniel Söderberg
@raskolnikoov
I talked to Roger Johansson about this now and he answered that it's not possible to do my test case.
Maxim Cherednik
@maxcherednik
yeah - like you described - not possible...
Aaron Stannard
@Aaronontheweb
@Rattenkrieg I haven't seen any examples of this being needed in practice
but with your changes to the MNTR in #2502
is it still possible to give one node amongst the others in the spec its own configuration?