Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 13:12
    Aaronontheweb labeled #4099
  • 13:12
    Aaronontheweb labeled #4099
  • 13:12
    Aaronontheweb opened #4099
  • 10:41
    Aaronontheweb commented #4097
  • 08:19
    ismaelhamed synchronize #4097
  • 02:22
    kimbyungeun opened #4098
  • Dec 15 19:47

    Aaronontheweb on dev

    TypeExtensions.TypeQualifiedNam… (compare)

  • Dec 15 19:47
    Aaronontheweb closed #4071
  • Dec 15 19:47
    Aaronontheweb closed #3767
  • Dec 15 19:47
    Aaronontheweb labeled #3767
  • Dec 15 19:47
    Aaronontheweb labeled #3767
  • Dec 15 19:47
    Aaronontheweb milestoned #3767
  • Dec 15 19:44
    Aaronontheweb labeled #4097
  • Dec 15 19:44
    Aaronontheweb milestoned #4097
  • Dec 15 13:23
    Aaronontheweb commented #4096
  • Dec 15 13:22
    Aaronontheweb commented #4093
  • Dec 15 13:16
    ismaelhamed commented #4093
  • Dec 15 13:04
    ismaelhamed edited #4097
  • Dec 15 13:04
    ismaelhamed opened #4097
  • Dec 15 12:50
    ismaelhamed commented #4096
Bartosz Sypytkowski
@Horusiath
this way while message needs to be enveloped with Authenticate to be send with tell, but on the actor side it's actually transparent
Damian Reeves
@DamianReeves
sounds straightforward and clean... thanks
Aaron Stannard
@Aaronontheweb
@Horusiath @DamianReeves nope, neither supports TLS right now
1.5 will though
Daniel D'Agostino
@dandago2_twitter
hi guys, when you Persist(), is there any mechanism that gives you the sequence number you just saved?
Vagif Abilov
@object
Regarding Akka.Quartz.Actor: it would be great to publish a Nuget package for it.
Bartosz Sypytkowski
@Horusiath
@dandago2_twitter persistent actor itself has property LastSequenceNr
Maciek Misztal
@mmisztal1980
is anyone aware of a potential situation when Become(...) would make the actor unresponsive?
rsinohara
@rsinohara
Hello everyone. Can someone help me? My IgnoreMessages() do not work when I run every test I have, but it works when I run just that one test.
I am recreating everything on the setup before each test.
Aaron Stannard
@Aaronontheweb
@rsinohara you're using the Akka.NET TestKit and which implementation of it?
rsinohara
@rsinohara
nunit
this behavior is consistent
Aaron Stannard
@Aaronontheweb
if you're using the built-in mechanics there
and not reinventing the wheel
we guarantee that you start with a clean actorsystem each time
so this shouldn't be able to happen
@mmisztal1980 no, I'm not
rsinohara
@rsinohara
Yes, I recreate every TestProbe, props and actors on [Setup]
If I run that test + any other one, it fails (because it doesn't ignore that message)
_actor.Tell(new GameActor.NewGameMessage(new List<PlayerData>() { _userData1, _userData2 }));

            _userActorProbe1.IgnoreMessages(m=> m is UserActor.WelcomeToGameMessage);
            _userActorProbe2.IgnoreMessages(m => m is UserActor.WelcomeToGameMessage);

            _userActorProbe1.ExpectMsg<UserActor.GameInitializedMessage>();
            _userActorProbe2.ExpectMsg<UserActor.GameInitializedMessage>();
wait. Should my IgnoreMsgs be before .Tell?
Aaron Stannard
@Aaronontheweb
if the tell generates the messages that need to be ignored
then yep
rsinohara
@rsinohara
I just did that and it works... why on earth did I have them after?
Aaron Stannard
@Aaronontheweb
haha
rsinohara
@rsinohara
Still puzzled about why it worked when that test was run individually, but there you go... I've had this issue for days lol
Aaron Stannard
@Aaronontheweb
guess you just needed some "rubber duck debugging" for that one :p https://en.wikipedia.org/wiki/Rubber_duck_debugging
might have worked when 1 test at a time because this is a race condition
the actor will asynchronously receive those messages as part of the tell
rsinohara
@rsinohara
I just needed to read the code after a few days off it :)
Aaron Stannard
@Aaronontheweb
and the ignore messages is synchronous
so it was just coincidence that it worked at all - whereas when you ran the full suite you eventually hit a case where you lost the race
rsinohara
@rsinohara
That's why this test is the only one that had this issue, as others I have ignores use TestActors
Maciek Misztal
@mmisztal1980
@Aaronontheweb After a 3rd Become, I'm trying to do a Self.Tell(new Msg()) but that Msg is never received, even though the Receive<Msg>(...) is set in that Become(...) handler
rsinohara
@rsinohara
btw congrats Aaron, besides the nice work on akka.net, you're an amazing speaker
rsinohara
@rsinohara
Hmm, I cannot call methods on TestActor.UnderlyingActor... What is the recommended way to make a test actor become something, without having to go through all the state changes?
(Or is the only way to create a message handler just for this?)
Bartosz Sypytkowski
@Horusiath

@rsinohara think about this a little differently. Become essentially builds a state machine. C# await also builds a state machine:

DoSomething();
await DoSomethingAsync(); // in this continuation the behavior switches
DoSomethingElse();

How do you want to check if DoSomethingElse() has been called without calling first two methods before?

rsinohara
@rsinohara
@Horusiath I'm not sure what you mean. Suppose my actor goes S1->S2->S3. I want to test S3 behavior, without having to interact with the actor to make it follow nominal path from S1 to S3.
I just want to set that state, then test its behavior, not test the state change flow.
Bartosz Sypytkowski
@Horusiath
what I'm trying to say, is that's impossible unless you already have some start point, which allows you to omit are intermediate steps
just like you cannot execute only the last line of the method without going through every statement before
rsinohara
@rsinohara
Well I can create a message handler that will directly call the specific Become... but I'll be creating a handler just to accommodate tests - which I'd avoid unless there is no way
Bartosz Sypytkowski
@Horusiath
when writing tests for akka, I usually write the whole initialization code (if it's repeatable, make a separate method from it)
rsinohara
@rsinohara
If Underlying actor exposed methods, that would be as simples as calling a method that Becomes what I need for the test in question.
A hack would be to do it through a property setter/getter (ewww)
Bartosz Sypytkowski
@Horusiath
if I make a shortcut to test only the specific behavior without steps that I need to make on the way, then I'm not truly testing that behavior. Simply because the tested scenario is artificial and doesn't occur in reality
heh, testing only the behavior is something that's going to happen, when akka-typed goes out :P
rsinohara
@rsinohara
I get what you mean now