Skip to content

Commit

Permalink
ClusterStressSpec and Cluster Failure Detector Cleanup (#4940)
Browse files Browse the repository at this point in the history
* implementation of Akka.Cluster.Tests.MultiNode.StressSpec

* made MuteLog overrideable in Akka.Cluster.Testkit

* if Roles is empty, then don't run the thunk on any nodes

Changed this to make it consistent with the JVM

* made it possible to actually enable Cluster.AssertInvariants via environment variable

* added assert invariants to build script

cleaned up gossip class to assert more invariants

* ReSharper'd Reachability.cs

* cleaned up immutability and CAS issues inside DefaultFailureDetectorRegistry

added bugfix from akka/akka#23595
  • Loading branch information
Aaronontheweb authored Apr 16, 2021
1 parent c87b627 commit 3ac3ee8
Show file tree
Hide file tree
Showing 15 changed files with 1,741 additions and 336 deletions.
2 changes: 2 additions & 0 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ Target "MultiNodeTests" (fun _ ->

Target "MultiNodeTestsNetCore" (fun _ ->
if not skipBuild.Value then
setEnvironVar "akka.cluster.assert" "on" // needed to enable assert invariants for Akka.Cluster
let multiNodeTestPath = findToolInSubPath "Akka.MultiNodeTestRunner.dll" (currentDirectory @@ "src" @@ "core" @@ "Akka.MultiNodeTestRunner" @@ "bin" @@ "Release" @@ testNetCoreVersion @@ "win10-x64" @@ "publish")

let projects =
Expand Down Expand Up @@ -388,6 +389,7 @@ Target "MultiNodeTestsNetCore" (fun _ ->
)
Target "MultiNodeTestsNet" (fun _ ->
if not skipBuild.Value then
setEnvironVar "akka.cluster.assert" "on" // needed to enable assert invariants for Akka.Cluster
let multiNodeTestPath = findToolInSubPath "Akka.MultiNodeTestRunner.dll" (currentDirectory @@ "src" @@ "core" @@ "Akka.MultiNodeTestRunner" @@ "bin" @@ "Release" @@ testNetVersion @@ "win10-x64" @@ "publish")

let projects =
Expand Down
4 changes: 2 additions & 2 deletions src/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<Copyright>Copyright © 2013-2021 Akka.NET Team</Copyright>
<Authors>Akka.NET Team</Authors>
<VersionPrefix>1.4.18</VersionPrefix>
<VersionPrefix>1.4.19</VersionPrefix>
<PackageIconUrl>https://getakka.net/images/akkalogo.png</PackageIconUrl>
<PackageProjectUrl>https://github.com/akkadotnet/akka.net</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/akkadotnet/akka.net/blob/master/LICENSE</PackageLicenseUrl>
Expand All @@ -29,7 +29,7 @@
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
<PropertyGroup>
<PackageReleaseNotes>Placeholder for Nightlies**</PackageReleaseNotes>
<PackageReleaseNotes>Placeholder for nightlies**</PackageReleaseNotes>
</PropertyGroup>
<!-- SourceLink support for all Akka.NET projects -->
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/core/Akka.Cluster.TestKit/MultiNodeClusterSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ protected override void AfterTermination()

//TODO: ExpectedTestDuration?

void MuteLog(ActorSystem sys = null)
public virtual void MuteLog(ActorSystem sys = null)
{
if (sys == null) sys = Sys;
if (!sys.Log.IsDebugEnabled)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<PropertyGroup>
<AssemblyTitle>Akka.Cluster.Tests.MultiNode</AssemblyTitle>
<TargetFrameworks>$(NetFrameworkTestVersion);$(NetTestVersion);$(NetCoreTestVersion)</TargetFrameworks>
<LangVersion>latest</LangVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/core/Akka.Cluster.Tests.MultiNode/Bugfix4353Specs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protected Bugfix4353Spec(Bugfix4353SpecsConfig config) : base(config, typeof(Bug
}

[MultiNodeFact]
public void Bugfix4353Spec_Cluster_of_3_must_reach_cnovergence()
public void Bugfix4353Spec_Cluster_of_3_must_reach_convergence()
{
AwaitClusterUp(First, Second, Third);
EnterBarrier("after-1");
Expand Down
Loading

0 comments on commit 3ac3ee8

Please sign in to comment.