diff --git a/build-system/pr-validation.yaml b/build-system/pr-validation.yaml
index 8785bb8957e..b71e3eef393 100644
--- a/build-system/pr-validation.yaml
+++ b/build-system/pr-validation.yaml
@@ -140,22 +140,10 @@ jobs:
- template: azure-pipeline.mntr-template.yaml
parameters:
- name: "net_fx_mntr_windows"
- displayName: ".NET Framework Multi-Node Tests (Windows)"
- vmImage: "windows-2019"
- scriptFileName: "build.cmd"
- scriptArgs: MultiNodeTests incremental
- outputDirectory: "TestResults"
- artifactName: "net_fx_mntr_windows-$(Build.BuildId)"
- mntrFailuresDir: 'TestResults\\multinode'
- mntrFailuresArtifactName: "net_fx_mntr_FAILED_windows-$(Build.BuildId)"
-
- - template: azure-pipeline.mntr-template.yaml
- parameters:
- name: "net_5_mntr_windows"
- displayName: ".NET 5 Multi-Node Tests (Windows)"
- vmImage: "windows-2019"
- scriptFileName: "build.cmd"
+ name: 'net_5_mntr_windows'
+ displayName: '.NET 5 Multi-Node Tests (Windows)'
+ vmImage: 'windows-2019'
+ scriptFileName: 'build.cmd'
scriptArgs: MultiNodeTestsNet incremental
outputDirectory: "TestResults"
artifactName: "net_5_mntr_windows-$(Build.BuildId)"
diff --git a/build.fsx b/build.fsx
index f75551d0664..8fa7340a2cc 100644
--- a/build.fsx
+++ b/build.fsx
@@ -1,3 +1,5 @@
+open System.Runtime.ExceptionServices
+
#I @"tools/FAKE/tools"
#r "FakeLib.dll"
@@ -238,7 +240,9 @@ Target "RunTests" (fun _ ->
let rawProjects = match (isWindows) with
| true -> !! "./src/**/*.Tests.*sproj"
++ "./src/**/Akka.Streams.Tests.TCK.csproj"
+ -- "./src/**/*.Tests.MultiNode.csproj"
| _ -> !! "./src/**/*.Tests.*sproj" // if you need to filter specs for Linux vs. Windows, do it here
+ -- "./src/**/*.Tests.MultiNode.csproj"
rawProjects |> Seq.choose filterProjects
let runSingleProject project =
@@ -264,7 +268,9 @@ Target "RunTestsNetCore" (fun _ ->
let rawProjects = match (isWindows) with
| true -> !! "./src/**/*.Tests.*sproj"
++ "./src/**/Akka.Streams.Tests.TCK.csproj"
+ -- "./src/**/*.Tests.MultiNode.csproj"
| _ -> !! "./src/**/*.Tests.*sproj" // if you need to filter specs for Linux vs. Windows, do it here
+ -- "./src/**/*.Tests.MultiNode.csproj"
rawProjects |> Seq.choose filterProjects
let runSingleProject project =
@@ -290,7 +296,9 @@ Target "RunTestsNet" (fun _ ->
let rawProjects = match (isWindows) with
| true -> !! "./src/**/*.Tests.*sproj"
++ "./src/**/Akka.Streams.Tests.TCK.csproj"
+ -- "./src/**/*.Tests.MultiNode.csproj"
| _ -> !! "./src/**/*.Tests.*sproj" // if you need to filter specs for Linux vs. Windows, do it here
+ -- "./src/**/*.Tests.MultiNode.csproj"
rawProjects |> Seq.choose filterProjects
let runSingleProject project =
@@ -310,9 +318,9 @@ Target "RunTestsNet" (fun _ ->
projects |> Seq.iter (runSingleProject)
)
-Target "MultiNodeTests" (fun _ ->
+Target "MultiNodeTestsNetCore" (fun _ ->
if not skipBuild.Value then
- let multiNodeTestPath = findToolInSubPath "Akka.MultiNodeTestRunner.exe" (currentDirectory @@ "src" @@ "core" @@ "Akka.MultiNodeTestRunner" @@ "bin" @@ "Release" @@ testNetFrameworkVersion)
+ setEnvironVar "AKKA_CLUSTER_ASSERT" "on" // needed to enable assert invariants for Akka.Cluster
let projects =
let rawProjects = match (isWindows) with
@@ -320,36 +328,32 @@ Target "MultiNodeTests" (fun _ ->
| _ -> !! "./src/**/*.Tests.MulitNode.csproj" // if you need to filter specs for Linux vs. Windows, do it here
rawProjects |> Seq.choose filterProjects
- let multiNodeTestAssemblies =
- projects |> Seq.choose (getTestAssembly Runtime.NetFramework)
-
- printfn "Using MultiNodeTestRunner: %s" multiNodeTestPath
-
- let runMultiNodeSpec assembly =
- let spec = getBuildParam "spec"
-
- let args = StringBuilder()
- |> append assembly
- |> append (sprintf "-Dmultinode.reporter=%s" (if hasTeamCity then "teamcity" else "trx"))
- |> append "-Dmultinode.enable-filesink=on"
- |> append (sprintf "-Dmultinode.output-directory=\"%s\"" outputMultiNode)
- |> append (sprintf "-Dmultinode.failed-specs-directory=\"%s\"" outputFailedMultiNode)
- |> appendIfNotNullOrEmpty spec "-Dmultinode.spec="
- |> toText
+ let runSingleProject project =
+ let arguments =
+ match (hasTeamCity) with
+ | true -> (sprintf "test -c Release --no-build --logger:trx --logger:\"console;verbosity=normal\" --framework %s --results-directory \"%s\" -- -parallel none -teamcity" testNetCoreVersion outputMultiNode)
+ | false -> (sprintf "test -c Release --no-build --logger:trx --logger:\"console;verbosity=normal\" --framework %s --results-directory \"%s\" -- -parallel none" testNetCoreVersion outputMultiNode)
let result = ExecProcess(fun info ->
- info.FileName <- multiNodeTestPath
- info.WorkingDirectory <- (Path.GetDirectoryName (FullName multiNodeTestPath))
- info.Arguments <- args) (System.TimeSpan.FromMinutes 60.0) (* This is a VERY long running task. *)
- if result <> 0 then failwithf "MultiNodeTestRunner failed. %s %s" multiNodeTestPath args
+ info.FileName <- "dotnet"
+ info.WorkingDirectory <- (Directory.GetParent project).FullName
+ info.Arguments <- arguments) (TimeSpan.FromMinutes 90.0)
+
+ ResultHandling.failBuildIfXUnitReportedError TestRunnerErrorLevel.Error result
- multiNodeTestAssemblies |> Seq.iter (runMultiNodeSpec)
+ CreateDir outputMultiNode
+ projects |> Seq.iter ( fun project ->
+ try
+ runSingleProject project
+ with
+ ex ->
+ raise (Exception(sprintf "Exception thrown while testing %s" project, ex))
+ )
)
-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" @@ testNetCoreVersion @@ "win10-x64" @@ "publish")
let projects =
let rawProjects = match (isWindows) with
@@ -357,76 +361,27 @@ Target "MultiNodeTestsNetCore" (fun _ ->
| _ -> !! "./src/**/*.Tests.MulitNode.csproj" // if you need to filter specs for Linux vs. Windows, do it here
rawProjects |> Seq.choose filterProjects
- let multiNodeTestAssemblies =
- projects |> Seq.choose (getTestAssembly Runtime.NetCore)
-
- printfn "Using MultiNodeTestRunner: %s" multiNodeTestPath
-
- let runMultiNodeSpec assembly =
- match assembly with
- | null -> ()
- | _ ->
- let spec = getBuildParam "spec"
-
- let args = StringBuilder()
- |> append multiNodeTestPath
- |> append assembly
- |> append "-Dmultinode.reporter=trx"
- |> append "-Dmultinode.enable-filesink=on"
- |> append (sprintf "-Dmultinode.output-directory=\"%s\"" outputMultiNode)
- |> append (sprintf "-Dmultinode.failed-specs-directory=\"%s\"" outputFailedMultiNode)
- |> append "-Dmultinode.platform=netcore"
- |> appendIfNotNullOrEmpty spec "-Dmultinode.spec="
- |> toText
-
- let result = ExecProcess(fun info ->
- info.FileName <- "dotnet"
- info.WorkingDirectory <- (Path.GetDirectoryName (FullName multiNodeTestPath))
- info.Arguments <- args) (System.TimeSpan.FromMinutes 60.0) (* This is a VERY long running task. *)
- if result <> 0 then failwithf "MultiNodeTestRunner failed. %s %s" multiNodeTestPath args
-
- multiNodeTestAssemblies |> Seq.iter (runMultiNodeSpec)
-)
-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 runSingleProject project =
+ let arguments =
+ match (hasTeamCity) with
+ | true -> (sprintf "test -c Release --no-build --logger:trx --logger:\"console;verbosity=normal\" --framework %s --results-directory \"%s\" -- -parallel none -teamcity" testNetVersion outputMultiNode)
+ | false -> (sprintf "test -c Release --no-build --logger:trx --logger:\"console;verbosity=normal\" --framework %s --results-directory \"%s\" -- -parallel none" testNetVersion outputMultiNode)
- let projects =
- let rawProjects = match (isWindows) with
- | true -> !! "./src/**/*.Tests.MultiNode.csproj"
- | _ -> !! "./src/**/*.Tests.MulitNode.csproj" // if you need to filter specs for Linux vs. Windows, do it here
- rawProjects |> Seq.choose filterProjects
+ let result = ExecProcess(fun info ->
+ info.FileName <- "dotnet"
+ info.WorkingDirectory <- (Directory.GetParent project).FullName
+ info.Arguments <- arguments) (TimeSpan.FromMinutes 90.0)
+
+ ResultHandling.failBuildIfXUnitReportedError TestRunnerErrorLevel.Error result
- let multiNodeTestAssemblies =
- projects |> Seq.choose (getTestAssembly Runtime.Net)
-
- printfn "Using MultiNodeTestRunner: %s" multiNodeTestPath
-
- let runMultiNodeSpec assembly =
- match assembly with
- | null -> ()
- | _ ->
- let spec = getBuildParam "spec"
-
- let args = StringBuilder()
- |> append multiNodeTestPath
- |> append assembly
- |> append "-Dmultinode.reporter=trx"
- |> append "-Dmultinode.enable-filesink=on"
- |> append (sprintf "-Dmultinode.output-directory=\"%s\"" outputMultiNode)
- |> append (sprintf "-Dmultinode.failed-specs-directory=\"%s\"" outputFailedMultiNode)
- |> append "-Dmultinode.platform=net5"
- |> appendIfNotNullOrEmpty spec "-Dmultinode.spec="
- |> toText
-
- let result = ExecProcess(fun info ->
- info.FileName <- "dotnet"
- info.WorkingDirectory <- (Path.GetDirectoryName (FullName multiNodeTestPath))
- info.Arguments <- args) (System.TimeSpan.FromMinutes 60.0) (* This is a VERY long running task. *)
- if result <> 0 then failwithf "MultiNodeTestRunner failed. %s %s" multiNodeTestPath args
-
- multiNodeTestAssemblies |> Seq.iter (runMultiNodeSpec)
+ CreateDir outputMultiNode
+ projects |> Seq.iter ( fun project ->
+ try
+ runSingleProject project
+ with
+ ex ->
+ raise (Exception(sprintf "Exception thrown while testing %s" project, ex))
+ )
)
Target "NBench" (fun _ ->
ensureDirectory outputPerfTests
@@ -746,7 +701,6 @@ Target "RunTestsNetCoreFull" DoNothing
"BuildRelease" ==> "MultiNodeTestsNetCore"
"BuildRelease" ==> "MultiNodeTestsNet"
-"BuildRelease" ==> "MultiNodeTests"
// nuget dependencies
"BuildRelease" ==> "CreateMntrNuget" ==> "CreateNuget" ==> "PublishNuget" ==> "Nuget"
@@ -759,7 +713,6 @@ Target "RunTestsNetCoreFull" DoNothing
"RunTests" ==> "All"
"RunTestsNetCore" ==> "All"
"RunTestsNet" ==> "All"
-"MultiNodeTests" ==> "All"
"MultiNodeTestsNetCore" ==> "All"
"MultiNodeTestsNet" ==> "All"
"NBench" ==> "All"
diff --git a/src/NuGet.Config b/src/NuGet.Config
index 0492904e008..4f632aae784 100644
--- a/src/NuGet.Config
+++ b/src/NuGet.Config
@@ -4,7 +4,6 @@
-
diff --git a/src/common.props b/src/common.props
index a7aea22965e..23494ae5529 100644
--- a/src/common.props
+++ b/src/common.props
@@ -24,6 +24,7 @@
2.16.3
2.0.3
4.7.0
+ 1.0.0-beta2
akka;actors;actor model;Akka;concurrency
diff --git a/src/contrib/cluster/Akka.Cluster.Metrics.Tests.MultiNode/Akka.Cluster.Metrics.Tests.MultiNode.csproj b/src/contrib/cluster/Akka.Cluster.Metrics.Tests.MultiNode/Akka.Cluster.Metrics.Tests.MultiNode.csproj
index 7ede9fd7298..d2ec0c471c0 100644
--- a/src/contrib/cluster/Akka.Cluster.Metrics.Tests.MultiNode/Akka.Cluster.Metrics.Tests.MultiNode.csproj
+++ b/src/contrib/cluster/Akka.Cluster.Metrics.Tests.MultiNode/Akka.Cluster.Metrics.Tests.MultiNode.csproj
@@ -3,7 +3,7 @@
Akka.Cluster.Metrics.Tests.MultiNode
- $(NetFrameworkTestVersion);$(NetTestVersion);$(NetCoreTestVersion)
+ $(NetTestVersion);$(NetCoreTestVersion)
@@ -13,9 +13,8 @@
+
-
-
diff --git a/src/contrib/cluster/Akka.Cluster.Sharding.Tests.MultiNode/Akka.Cluster.Sharding.Tests.MultiNode.csproj b/src/contrib/cluster/Akka.Cluster.Sharding.Tests.MultiNode/Akka.Cluster.Sharding.Tests.MultiNode.csproj
index 09481b6eb45..68959b328df 100644
--- a/src/contrib/cluster/Akka.Cluster.Sharding.Tests.MultiNode/Akka.Cluster.Sharding.Tests.MultiNode.csproj
+++ b/src/contrib/cluster/Akka.Cluster.Sharding.Tests.MultiNode/Akka.Cluster.Sharding.Tests.MultiNode.csproj
@@ -3,7 +3,7 @@
Akka.Cluster.Sharding.Tests.MultiNode
- $(NetFrameworkTestVersion);$(NetTestVersion);$(NetCoreTestVersion)
+ $(NetTestVersion);$(NetCoreTestVersion)
@@ -15,9 +15,8 @@
+
-
-
diff --git a/src/contrib/cluster/Akka.Cluster.Tools.Tests.MultiNode/Akka.Cluster.Tools.Tests.MultiNode.csproj b/src/contrib/cluster/Akka.Cluster.Tools.Tests.MultiNode/Akka.Cluster.Tools.Tests.MultiNode.csproj
index b996e0f0ec5..d0f9e768f29 100644
--- a/src/contrib/cluster/Akka.Cluster.Tools.Tests.MultiNode/Akka.Cluster.Tools.Tests.MultiNode.csproj
+++ b/src/contrib/cluster/Akka.Cluster.Tools.Tests.MultiNode/Akka.Cluster.Tools.Tests.MultiNode.csproj
@@ -3,7 +3,7 @@
Akka.Cluster.Tools.Tests.MultiNode
- $(NetFrameworkTestVersion);$(NetTestVersion);$(NetCoreTestVersion)
+ $(NetTestVersion);$(NetCoreTestVersion)
@@ -14,9 +14,8 @@
+
-
-
diff --git a/src/contrib/cluster/Akka.DistributedData.Tests.MultiNode/Akka.DistributedData.Tests.MultiNode.csproj b/src/contrib/cluster/Akka.DistributedData.Tests.MultiNode/Akka.DistributedData.Tests.MultiNode.csproj
index 1af50b8ad25..cfdb48fe75c 100644
--- a/src/contrib/cluster/Akka.DistributedData.Tests.MultiNode/Akka.DistributedData.Tests.MultiNode.csproj
+++ b/src/contrib/cluster/Akka.DistributedData.Tests.MultiNode/Akka.DistributedData.Tests.MultiNode.csproj
@@ -3,7 +3,7 @@
Akka.DistributedData.Tests.MultiNode
- $(NetFrameworkTestVersion);$(NetTestVersion);$(NetCoreTestVersion)
+ $(NetTestVersion);$(NetCoreTestVersion)
@@ -14,9 +14,8 @@
+
-
-
diff --git a/src/core/Akka.Cluster.Tests.MultiNode/Akka.Cluster.Tests.MultiNode.csproj b/src/core/Akka.Cluster.Tests.MultiNode/Akka.Cluster.Tests.MultiNode.csproj
index 05e13029eda..38652c8d6cc 100644
--- a/src/core/Akka.Cluster.Tests.MultiNode/Akka.Cluster.Tests.MultiNode.csproj
+++ b/src/core/Akka.Cluster.Tests.MultiNode/Akka.Cluster.Tests.MultiNode.csproj
@@ -3,7 +3,7 @@
Akka.Cluster.Tests.MultiNode
- $(NetFrameworkTestVersion);$(NetTestVersion);$(NetCoreTestVersion)
+ $(NetTestVersion);$(NetCoreTestVersion)
latest
@@ -14,9 +14,8 @@
+
-
-
diff --git a/src/core/Akka.Cluster.Tests.MultiNode/RestartFirstSeedNodeSpec.cs b/src/core/Akka.Cluster.Tests.MultiNode/RestartFirstSeedNodeSpec.cs
index fbffa29b4dd..440b85b1449 100644
--- a/src/core/Akka.Cluster.Tests.MultiNode/RestartFirstSeedNodeSpec.cs
+++ b/src/core/Akka.Cluster.Tests.MultiNode/RestartFirstSeedNodeSpec.cs
@@ -106,20 +106,17 @@ public void Cluster_seed_nodes__must_be_able_to_restart_first_seed_node_and_join
{
var seeds = GetSeedNodes();
seeds.Count.Should().Be(4); // validate that we have complete seed node list
- Cluster.Get(seed1System.Value).JoinSeedNodes(seeds);
+ var cluster = Cluster.Get(seed1System.Value);
+ cluster.JoinSeedNodes(seeds);
AwaitAssert(() =>
{
- Cluster.Get(seed1System.Value)
- .State.Members.Count
- .Should()
- .Be(3);
- }, TimeSpan.FromSeconds(10));
+ cluster.State.Members.Count.Should().Be(3);
+ }, TimeSpan.FromSeconds(20));
AwaitAssert(() =>
{
- Cluster.Get(seed1System.Value)
+ cluster
.State.Members.All(c => c.Status == MemberStatus.Up)
- .Should()
- .BeTrue();
+ .Should().BeTrue();
});
}, _config.Seed1);
RunOn(() =>
diff --git a/src/core/Akka.Remote.Tests.MultiNode/Akka.Remote.Tests.MultiNode.csproj b/src/core/Akka.Remote.Tests.MultiNode/Akka.Remote.Tests.MultiNode.csproj
index aa0d86570ea..14b3c52a0ff 100644
--- a/src/core/Akka.Remote.Tests.MultiNode/Akka.Remote.Tests.MultiNode.csproj
+++ b/src/core/Akka.Remote.Tests.MultiNode/Akka.Remote.Tests.MultiNode.csproj
@@ -3,7 +3,7 @@
Akka.Remote.Tests.MultiNode
- $(NetFrameworkTestVersion);$(NetTestVersion);$(NetCoreTestVersion)
+ $(NetTestVersion);$(NetCoreTestVersion)
@@ -12,9 +12,8 @@
+
-
-