Skip to content

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

@Aaronontheweb

Description

@Aaronontheweb

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);
        }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions