public void A_gossip_must_not_reach_convergence_when_unreachable() { var r1 = Reachability.Empty.Unreachable(b1.UniqueAddress, a1.UniqueAddress); var g1 = new Gossip(ImmutableSortedSet.Create(a1, b1), new GossipOverview(r1)) .Seen(a1.UniqueAddress).Seen(b1.UniqueAddress); g1.Convergence(b1.UniqueAddress).Should().BeFalse(); // but from a1's point of view (it knows that itself is not unreachable) g1.Convergence(a1.UniqueAddress).Should().BeTrue(); }
public void A_gossip_must_reach_convergence_skipping_down() { // e3 is down var g1 = new Gossip(ImmutableSortedSet.Create(a1, b1, e3)).Seen(a1.UniqueAddress).Seen(b1.UniqueAddress); g1.Convergence(a1.UniqueAddress).Should().BeTrue(); }
public void A_gossip_must_reach_convergence_skipping_joining() { // e1 is joining var g1 = new Gossip(ImmutableSortedSet.Create(a1, b1, e1)).Seen(a1.UniqueAddress).Seen(b1.UniqueAddress); g1.Convergence(a1.UniqueAddress, new HashSet <UniqueAddress>()).Should().BeTrue(); }
public void A_gossip_must_reach_convergence_when_downed_node_has_observed_unreachable() { // e3 is Down var r1 = Reachability.Empty.Unreachable(e3.UniqueAddress, a1.UniqueAddress); var g1 = new Gossip(ImmutableSortedSet.Create(a1, b1, e3), new GossipOverview(r1)) .Seen(a1.UniqueAddress).Seen(b1.UniqueAddress).Seen(e3.UniqueAddress); g1.Convergence(b1.UniqueAddress).Should().BeTrue(); }
public void A_gossip_must_reach_convergence_skipping_Leaving_with_ExitingConfirmed() { // c1 is leaving var g1 = new Gossip(ImmutableSortedSet.Create(a1, b1, c1)).Seen(a1.UniqueAddress).Seen(b1.UniqueAddress); g1.Convergence(a1.UniqueAddress, new HashSet <UniqueAddress>() { c1.UniqueAddress }).Should().BeTrue(); }
public void A_gossip_must_not_reach_reach_convergence_for_two_nodes() { var g1 = new Gossip(ImmutableSortedSet.Create(a1, b1)).Seen(a1.UniqueAddress).Seen(b1.UniqueAddress); g1.Convergence(a1.UniqueAddress).Should().BeTrue(); }
public void A_gossip_must_not_reach_convergence_until_all_have_seen_version() { var g1 = new Gossip(ImmutableSortedSet.Create(a1, b1)).Seen(a1.UniqueAddress); g1.Convergence(a1.UniqueAddress).Should().BeFalse(); }
public void A_gossip_must_reach_convergence_for_one_node() { var g1 = new Gossip(ImmutableSortedSet.Create(a1)).Seen(a1.UniqueAddress); g1.Convergence(a1.UniqueAddress, new HashSet <UniqueAddress>()).Should().BeTrue(); }