public void ClusterSharding_should_recover_coordinator_state_after_coordinator_crash()
{
ClusterSharding_should_use_third_and_fourth_node();
Within(TimeSpan.FromSeconds(60), () =>
{
Join(_fifth, _fourth);
RunOn(() =>
{
TestConductor.Exit(_first, 0).Wait();
}, _controller);
EnterBarrier("crash-first");
RunOn(() =>
{
var probe3 = CreateTestProbe();
AwaitAssert(() =>
{
Within(TimeSpan.FromSeconds(1), () =>
{
_region.Value.Tell(new Counter.Get(3), probe3.Ref);
probe3.ExpectMsg(11);
Assert.Equal(Node(_third) / "user" / "counterRegion" / "3" / "3", probe3.LastSender.Path);
});
});
var probe4 = CreateTestProbe();
AwaitAssert(() =>
{
Within(TimeSpan.FromSeconds(1), () =>
{
_region.Value.Tell(new Counter.Get(4), probe4.Ref);
probe4.ExpectMsg(21);
Assert.Equal(Node(_fourth) / "user" / "counterRegion" / "4" / "4", probe4.LastSender.Path);
});
});
}, _fifth);
EnterBarrier("after-8");
});
}