Skip to content

Commit

Permalink
[TEST] Add AsyncQueue to TestKit (#5672)
Browse files Browse the repository at this point in the history
* Moved the `akka core` configuration page into `modules`` (#5664)

* Fix link issue with `xref` (#5666)

Co-authored-by: Aaron Stannard <aaron@petabridge.com>

* [Docs]: Fix Metadata Reference  (#5668)

* Turn on `ProduceReferenceAssembly`

* Add `ProduceReferenceAssembly` to `common.props`

* Fix build failures in Akka.FSharp

* Revert `<ProduceReferenceAssembly>$(ProduceReferenceAssembly)</ProduceReferenceAssembly>` added to affected projects because it already exists in `common.props'

* Resolved invalid links (#5669)

* Check for possible broken documentation by failing on DocFX warning (#5542)

* Add --warningsAsErrors flag to DocFX

* Add check in AzDo pr validation yaml

* Use windows image for docfx test

* Fix build script name

* disable incremental builds for DocFx

Co-authored-by: Aaron Stannard <aaron@petabridge.com>

* Removed internal copy of Nito.AsyncEx.AsyncContext, used the nuget package instead

* Add asynchronous queue AsyncQueue to replace BlockingQueue

* Remove <inheritdoc> XML doc tags, its causing DocFX crash

Co-authored-by: Ebere Abanonu <eaba@users.noreply.github.com>
Co-authored-by: Aaron Stannard <aaron@petabridge.com>
Co-authored-by: Gregorius Soedharmo <gregorius.soedharmo@petabridge.com>
  • Loading branch information
4 people authored Feb 20, 2022
1 parent ce274b0 commit 67f61af
Show file tree
Hide file tree
Showing 34 changed files with 738 additions and 1,041 deletions.
2 changes: 2 additions & 0 deletions build-system/azure-pipeline.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ parameters:
scriptArgs: 'all'
outputDirectory: ''
timeoutInMinutes: 120
run_if: true

jobs:
- job: ${{ parameters.name }}
condition: eq( ${{ parameters.run_if }}, true )
displayName: ${{ parameters.displayName }}
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
pool:
Expand Down
11 changes: 11 additions & 0 deletions build-system/pr-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,17 @@ jobs:
outputDirectory: "TestResults"
artifactName: "net_core_tests_linux-$(Build.BuildId)"

- template: azure-pipeline.template.yaml
parameters:
name: "docfx_test"
displayName: "DocFX warning check"
vmImage: "windows-2019"
scriptFileName: build.cmd
scriptArgs: docfx
outputDirectory: "TestResults"
artifactName: "docfx_test-$(Build.BuildId)"
run_if: eq(variables['Build.Reason'], 'PullRequest')

- template: azure-pipeline.template.yaml
parameters:
name: "net_5_tests_windows"
Expand Down
19 changes: 13 additions & 6 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -632,12 +632,19 @@ Target "DocFx" (fun _ ->
Version = "0.1.0-alpha-1611021200"
OutputDirectory = currentDirectory @@ "tools" }) "msdn.4.5.2"

let docsPath = "./docs"
DocFx (fun p ->
{ p with
Timeout = TimeSpan.FromMinutes 30.0;
WorkingDirectory = docsPath;
DocFxJson = docsPath @@ "docfx.json" })
let docsPath = FullName "./docs"
let docFxPath = FullName(findToolInSubPath "docfx.exe" "tools/docfx.console/tools")

let args = StringBuilder()
|> append (docsPath @@ "docfx.json" )
|> append ("--warningsAsErrors")
|> toText

let result = ExecProcess(fun info ->
info.FileName <- docFxPath
info.WorkingDirectory <- (Path.GetDirectoryName (FullName docFxPath))
info.Arguments <- args) (System.TimeSpan.FromMinutes 45.0) (* Reasonably long-running task. *)
if result <> 0 then failwithf "DocFX failed. %s %s" docFxPath args
)

FinalTarget "KillCreatedProcesses" (fun _ ->
Expand Down
10 changes: 10 additions & 0 deletions docs/articles/configuration/akka.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<title>Akka Configuration</title>
<meta http-equiv = "refresh" content="1;url=../configuration/modules/akka.html" />
</head>
<body>
<p>This page has been moved to <a href="../configuration/modules/akka.html">Akka Configuration</a>.</p>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ title: Akka Configuration

Below is the default HOCON configuration for the base `Akka` package.

[!code[Akka.dll HOCON Configuration](../../../src/core/Akka/Configuration/Pigeon.conf)]
[!code[Akka.dll HOCON Configuration](../../../../src/core/Akka/Configuration/Pigeon.conf)]
2 changes: 2 additions & 0 deletions docs/articles/configuration/modules/toc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- name: Akka
href: akka.md
- name: Akka.Cluster
href: akka.cluster.md
- name: Akka.Remote
Expand Down
2 changes: 0 additions & 2 deletions docs/articles/configuration/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,5 @@
href: config.md
- name: HOCON Syntax and Practices in Akka.NET
href: hocon.md
- name: Akka
href: akka.md
- name: Modules
href: modules/toc.yml
2 changes: 1 addition & 1 deletion docs/articles/testing/multi-node-testing-old.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ The first step in creating an effective multi-node test is to define the configu

The declaration of the `RoleName` properties is what the MNTR uses to determine how many nodes will be participating in this test. In this example, the test will create exactly two test processes.

The `CommonConfig` element of the [`MultiNodeConfig` implementation class](../../api/Akka.Remote.TestKit.MultiNodeConfig.html) is the common config that will be used throughout all of the nodes inside the multi-node test. So, for instance, if you want all of the nodes in your test to run [Akka.Cluster.Sharding](xref:cluster-sharding) you'd want to include those configuration elements inside the `CommonConfig` property.
The `CommonConfig` element of the [`MultiNodeConfig` implementation class](xref:Akka.Remote.TestKit.MultiNodeConfig) is the common config that will be used throughout all of the nodes inside the multi-node test. So, for instance, if you want all of the nodes in your test to run [Akka.Cluster.Sharding](xref:cluster-sharding) you'd want to include those configuration elements inside the `CommonConfig` property.

#### Configuring Individual Nodes Differently

Expand Down
2 changes: 1 addition & 1 deletion docs/articles/testing/multi-node-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ The first step in creating an effective multi-node test is to define the configu

The declaration of the `RoleName` properties is what the MNTR uses to determine how many nodes will be participating in this test. In this example, the test will create exactly two test processes.

The `CommonConfig` element of the [`MultiNodeConfig` implementation class](../../api/Akka.Remote.TestKit.MultiNodeConfig.html) is the common config that will be used throughout all of the nodes inside the multi-node test. So, for instance, if you want all of the nodes in your test to run [Akka.Cluster.Sharding](xref:cluster-sharding) you'd want to include those configuration elements inside the `CommonConfig` property.
The `CommonConfig` element of the [`MultiNodeConfig` implementation class](xref:Akka.Remote.TestKit.MultiNodeConfig) is the common config that will be used throughout all of the nodes inside the multi-node test. So, for instance, if you want all of the nodes in your test to run [Akka.Cluster.Sharding](xref:cluster-sharding) you'd want to include those configuration elements inside the `CommonConfig` property.

#### Configuring Individual Nodes Differently

Expand Down
2 changes: 1 addition & 1 deletion docs/articles/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
- name: Streams Cookbook
href: streams/cookbook.md
- name: Configuration
href: configuration/akka.streams.md
href: configuration/modules/akka.streams.md
- name: Networking
items:
- name: I/O
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ h2:before{
<h1 class="title"><small class="subtitle">Follow our tutorial and build your first Akka.NET application today.</small></h1>
<div class="options">
<a class="btn btn-lg btn-primary" href="community/whats-new/akkadotnet-v1.4.md">What's new in Akka.NET v1.4.0?</a>
<a class="btn btn-lg btn-primary" href="articles/intro/getting-started/tutorial-overview.html">Get Started Now</a> <a class="btn btn-lg btn-primary" href="articles/intro/what-is-akka.md">Read the documentation</a>
<a class="btn btn-lg btn-primary" href="articles/intro/getting-started/tutorial-overview.md">Get Started Now</a> <a class="btn btn-lg btn-primary" href="articles/intro/what-is-akka.md">Read the documentation</a>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<NetFrameworkTestVersion>net471</NetFrameworkTestVersion>
<NetStandardLibVersion>netstandard2.0</NetStandardLibVersion>
<FluentAssertionsVersion>5.10.3</FluentAssertionsVersion>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
<FsCheckVersion>2.16.3</FsCheckVersion>
<HoconVersion>2.0.3</HoconVersion>
<ConfigurationManagerVersion>4.7.0</ConfigurationManagerVersion>
Expand Down
3 changes: 2 additions & 1 deletion src/core/Akka.FSharp.Tests/Akka.FSharp.Tests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

<PropertyGroup>
<AssemblyTitle>Akka.FSharp.Tests</AssemblyTitle>
<TargetFrameworks>$(NetFrameworkTestVersion);$(NetTestVersion);$(NetCoreTestVersion)</TargetFrameworks>
<TargetFrameworks>$(NetCoreTestVersion)</TargetFrameworks>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
1 change: 1 addition & 0 deletions src/core/Akka.FSharp/Akka.FSharp.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<TargetFrameworks>$(NetStandardLibVersion)</TargetFrameworks>
<PackageTags>$(AkkaPackageTags);F#;fsharp</PackageTags>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
<NoWarn></NoWarn>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<TargetFrameworks>$(NetStandardLibVersion)</TargetFrameworks>
<PackageTags>akka;actors;actor model;Akka;concurrency;F#;Fsharp;persistence;eventsource</PackageTags>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
</PropertyGroup>

<ItemGroup>
Expand Down
6 changes: 6 additions & 0 deletions src/core/Akka.TestKit/Akka.TestKit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<TargetFrameworks>$(NetStandardLibVersion)</TargetFrameworks>
<PackageTags>$(AkkaPackageTags)</PackageTags>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<LangVersion>8.0</LangVersion>
</PropertyGroup>

<ItemGroup>
Expand All @@ -26,6 +27,11 @@
</Compile>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Nito.AsyncEx.Coordination" Version="5.1.2" />
<PackageReference Include="Nito.AsyncEx.Context" Version="5.1.2" />
</ItemGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>
Expand Down
Loading

0 comments on commit 67f61af

Please sign in to comment.