Skip to content

Conversation

ismaelhamed
Copy link
Member

Currently, a quarantined node will be automatically downed and removed from the cluster without the downing provider being aware of the situation.

Port #25678

var secondUnique = Cluster.State.Members.SingleOrDefault(m => m.Address == GetAddress(_config.Second) && m.Status == MemberStatus.Up);
if (secondUnique == null)
{
// TODO: fail("Unexpected removal of quarantined node")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be some sort of assertion fail. Couldn't figure out the api for that in Akka.NET, yet.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can just use Fluent Assertions. Lookin at the code from original test:

var secondUniqueAddress = Cluster.State.Members.SingleOrDefault(m => m.Address == GetAddress(_config.Second));
secondUniqueAddress.Should().Not.BeNull(because: "2nd node should stay visible");
secondUniqueAddress.Status.Should().Be(MemberStatus.Up, because: "2nd node should be Up");

@Horusiath Horusiath self-requested a review September 29, 2018 11:55
Copy link
Contributor

@Horusiath Horusiath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only one case (missing assertion, @ismaelhamed pointed himself). Beside that, it's good to go 👍

var secondUnique = Cluster.State.Members.SingleOrDefault(m => m.Address == GetAddress(_config.Second) && m.Status == MemberStatus.Up);
if (secondUnique == null)
{
// TODO: fail("Unexpected removal of quarantined node")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can just use Fluent Assertions. Lookin at the code from original test:

var secondUniqueAddress = Cluster.State.Members.SingleOrDefault(m => m.Address == GetAddress(_config.Second));
secondUniqueAddress.Should().Not.BeNull(because: "2nd node should stay visible");
secondUniqueAddress.Status.Should().Be(MemberStatus.Up, because: "2nd node should be Up");

@ismaelhamed ismaelhamed changed the title [WIP] Don't automatically down quarantined nodes Don't automatically down quarantined nodes Sep 30, 2018
@Aaronontheweb Aaronontheweb added this to the 1.3.10 milestone Oct 1, 2018
@Aaronontheweb Aaronontheweb merged commit 308a9fb into akkadotnet:dev Oct 1, 2018
@Aaronontheweb
Copy link
Member

Thanks @ismaelhamed !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants