fix(cluster): enable SBR downing provider — automatic failover was inert for crashes/partitions
This commit is contained in:
@@ -160,4 +160,22 @@ public class HoconBuilderTests
|
||||
TimeSpan.FromMilliseconds(7500),
|
||||
config.GetTimeSpan("akka.remote.transport-failure-detector.acceptable-heartbeat-pause"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void BuildHocon_EnablesSplitBrainResolverDowningProvider()
|
||||
{
|
||||
// Review 01 [Critical]: without downing-provider-class the entire
|
||||
// split-brain-resolver section is inert (Akka default = NoDowning) and
|
||||
// singletons never migrate on a hard crash.
|
||||
var node = new NodeOptions { Role = "Central", NodeHostname = "node1", RemotingPort = 8081 };
|
||||
|
||||
var hocon = AkkaHostedService.BuildHocon(
|
||||
node, DefaultCluster(), new[] { "Central" },
|
||||
TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(15));
|
||||
|
||||
var config = ConfigurationFactory.ParseString(hocon);
|
||||
Assert.Equal(
|
||||
"Akka.Cluster.SBR.SplitBrainResolverProvider, Akka.Cluster",
|
||||
config.GetString("akka.cluster.downing-provider-class"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user