Skip to content

Commit

Permalink
Version 1.1.1 Release
Browse files Browse the repository at this point in the history
Version 1.1.1 Release
  • Loading branch information
Arkatufus committed Apr 21, 2022
2 parents 62d6712 + 0c26871 commit 79992ec
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 11 deletions.
6 changes: 6 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#### 1.1.1 April 21 2022 ####

* [Updated Akka.NET to 1.4.37](https://github.com/akkadotnet/akka.net/releases/tag/1.4.37)
* [Enabled the built-in TRX reporter](https://github.com/akkadotnet/Akka.MultiNodeTestRunner/pull/134) that is compatible with AzDo test error reporting.
To enable this TRX reporter, add `"useBuiltInTrxReporter": true` inside the `xunit.multinode.runner.json` settings file.

#### 1.1.0 January 6 2022 ####

Version 1.1.0 release.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="..\common.props" />

<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;$(NetCoreTestVersion);$(NetTestVersion)</TargetFrameworks>
<TargetFrameworks>$(NetCoreTestVersion);$(NetTestVersion)</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,7 @@ public string ListenAddress
public bool AppendLogOutput { get; set; } = true;

public string? Platform { get; set; }

public bool UseBuiltInTrxReporter { get; set; }
}
}
3 changes: 3 additions & 0 deletions src/Akka.MultiNode.TestAdapter/Configuration/OptionsReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ private static MultiNodeTestRunnerOptions Load(Stream configStream)
case JsonBoolean booleanValue:
if (string.Equals(propertyName, Configuration.AppendLogOutput, StringComparison.OrdinalIgnoreCase))
result.AppendLogOutput = booleanValue.Value;
if (string.Equals(propertyName, Configuration.UseBuiltInTrxReporter, StringComparison.OrdinalIgnoreCase))
result.UseBuiltInTrxReporter = booleanValue.Value;
break;

case JsonString stringValue:
Expand Down Expand Up @@ -87,6 +89,7 @@ static class Configuration
public const string ListenAddress = "listenAddress";
public const string ListenPort = "listenPort";
public const string AppendLogOutput = "appendLogOutput";
public const string UseBuiltInTrxReporter = "useBuiltInTrxReporter";
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,15 @@ protected override async Task<RunSummary> RunTestAsync()
");
TestRunSystem = ActorSystem.Create("TestRunnerLogging", config);

var sinks = new List<MessageSink>
{
new DiagnosticMessageSink(_diagnosticSink)
};
if(Options.UseBuiltInTrxReporter)
sinks.Add(new TrxMessageSink(DisplayName, Options));

SinkCoordinator = TestRunSystem.ActorOf(Props.Create(()
=> new SinkCoordinator(new[] { new DiagnosticMessageSink(_diagnosticSink) })), "sinkCoordinator");
=> new SinkCoordinator(sinks)), "sinkCoordinator");

var tcpLogger = TestRunSystem.ActorOf(Props.Create(() => new TcpLoggingServer(SinkCoordinator)), "TcpLogger");
var listenEndpoint = new IPEndPoint(IPAddress.Parse(Options.ListenAddress), Options.ListenPort);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@

using System;
using Akka.Actor;
using Akka.MultiNode.TestAdapter.Configuration;
using Akka.MultiNode.TestAdapter.Internal.Sinks;

namespace Akka.MultiNode.TestAdapter.Internal.TrxReporter
{
internal class TrxMessageSink : MessageSink
{
public TrxMessageSink(string suiteName)
: base(Props.Create(() => new TrxSinkActor(suiteName, System.Environment.UserName, System.Environment.MachineName, true)))
public TrxMessageSink(string suiteName, MultiNodeTestRunnerOptions options)
: base(Props.Create(() =>
new TrxSinkActor(suiteName, Environment.UserName, Environment.MachineName, true, options)))
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using System.IO;
using System.Linq;
using System.Xml.Linq;
using Akka.MultiNode.TestAdapter.Configuration;
using Akka.MultiNode.TestAdapter.Internal.Reporting;
using Akka.MultiNode.TestAdapter.Internal.Sinks;
using Akka.MultiNode.TestAdapter.Internal.TrxReporter.Models;
Expand All @@ -18,19 +19,26 @@ namespace Akka.MultiNode.TestAdapter.Internal.TrxReporter
{
internal class TrxSinkActor : TestCoordinatorEnabledMessageSink
{
public TrxSinkActor(string suiteName, string userName, string computerName, bool useTestCoordinator)
public TrxSinkActor(
string suiteName,
string userName,
string computerName,
bool useTestCoordinator,
MultiNodeTestRunnerOptions options)
: base(useTestCoordinator)
{
_computerName = computerName;
_testRun = new TestRun(suiteName)
{
RunUser = userName
};
_options = options;
}

private readonly string _computerName;
private readonly TestRun _testRun;
private SpecSession _session;
private MultiNodeTestRunnerOptions _options;

protected override void AdditionalReceives()
{
Expand Down Expand Up @@ -99,7 +107,7 @@ protected override void HandleTestRunEnd(EndTestRun endTestRun)
_testRun.Serialize()
);

doc.Save(Path.Combine(Directory.GetCurrentDirectory(), $@"mntr-{DateTime.UtcNow:yyyy'-'MM'-'dd'T'HH'-'mm'-'ss'-'fffffffK}.trx"));
doc.Save(Path.Combine(Path.GetFullPath(_options.OutputDirectory), $@"mntr-{DateTime.UtcNow:yyyy'-'MM'-'dd'T'HH'-'mm'-'ss'-'fffffffK}.trx"));
}

private static void ReportSpec(SpecSession session, TestRun testRun, string computerName, SpecLog log)
Expand Down
3 changes: 2 additions & 1 deletion src/Akka.MultiNode.TestAdapter/xunit.multinode.runner.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"failedSpecsDirectory": "FAILED_SPECS_LOGS",
"listenAddress": "127.0.0.1",
"listenPort": 0,
"clearOutputDirectory": false
"clearOutputDirectory": false,
"useBuiltInTrxReporter": false
}
8 changes: 4 additions & 4 deletions src/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
</PropertyGroup>
<PropertyGroup>
<XunitVersion>2.4.1</XunitVersion>
<TestSdkVersion>17.0.0</TestSdkVersion>
<TestSdkVersion>17.1.0</TestSdkVersion>
<HyperionVersion>0.9.12</HyperionVersion>
<CodeDomVersion>5.0.0</CodeDomVersion>
<CodeDomVersion>6.0.0</CodeDomVersion>
<TeamCityVersion>3.0.13</TeamCityVersion>
<SystemRuntimeLoaderVersion>4.3.0</SystemRuntimeLoaderVersion>
<DependencyModelVersion>5.0.0</DependencyModelVersion>
Expand All @@ -22,9 +22,9 @@
<NetCoreTestVersion>netcoreapp3.1</NetCoreTestVersion>
<NetTestVersion>net5.0</NetTestVersion>
<NetStandardLibVersion>netstandard2.0</NetStandardLibVersion>
<FluentAssertionsVersion>6.3.0</FluentAssertionsVersion>
<FluentAssertionsVersion>6.6.0</FluentAssertionsVersion>
<FsCheckVersion>2.9.0</FsCheckVersion>
<AkkaVersion>1.4.31</AkkaVersion>
<AkkaVersion>1.4.37</AkkaVersion>
<!--
<AkkaVersion>1.4.28-beta637717616449070703</AkkaVersion>
-->
Expand Down

0 comments on commit 79992ec

Please sign in to comment.