Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Akka.TestKit.TestProbe can't deliver DeathWatch notifications #2465

Closed
Aaronontheweb opened this issue Jan 20, 2017 · 1 comment
Closed

Akka.TestKit.TestProbe can't deliver DeathWatch notifications #2465

Aaronontheweb opened this issue Jan 20, 2017 · 1 comment

Comments

@Aaronontheweb
Copy link
Member

The TestProbe, as it is currently implemented, is not capable of signaling to any other actors who have Context.Watch'd it that is Terminated, which in essence means that it violates one of the guarantees actors are supposed to make.

This unit test will fail:

        /// <summary>
        /// Should be able to receive a <see cref="Terminated"/> message from a <see cref="TestProbe"/>
        /// if we're deathwatching it and it terminates.
        /// </summary>
        [Fact]
        public void TestProbe_should_send_Terminated_when_killed()
        {
            var p = CreateTestProbe();
            Watch(p);
            Sys.Stop(p);
            ExpectTerminated(p);
        }
@Aaronontheweb
Copy link
Member Author

This does work, however:

/// <summary>
        /// Should be able to receive a <see cref="Terminated"/> message from a <see cref="TestProbe"/>
        /// if we're deathwatching it and it terminates.
        /// </summary>
        [Fact]
        public void TestProbe_should_send_Terminated_when_killed()
        {
            var p = CreateTestProbe();
            Watch(p.Ref);
            Sys.Stop(p.Ref);
            ExpectTerminated(p.Ref);
        }

Aaronontheweb added a commit to Aaronontheweb/akka.net that referenced this issue Jan 20, 2017
Aaronontheweb added a commit to Aaronontheweb/akka.net that referenced this issue Jan 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant