Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions TestInstrumentation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ public override void OnStart()

class ResultConsumer(Instrumentation instrumentation) : IDataConsumer
{
public int Passed, Failed, Skipped;
int _passed, _failed, _skipped;
public int Passed => _passed;
public int Failed => _failed;
public int Skipped => _skipped;
public string? TrxReportPath;

public string Uid => nameof(ResultConsumer);
Expand Down Expand Up @@ -90,7 +93,7 @@ FailedTestNodeStateProperty or ErrorTestNodeStateProperty
if (outcome is null)
return Task.CompletedTask;

_ = outcome switch { "passed" => Passed++, "failed" => Failed++, _ => Skipped++ };
_ = outcome switch { "passed" => Interlocked.Increment(ref _passed), "failed" => Interlocked.Increment(ref _failed), _ => Interlocked.Increment(ref _skipped) };

var id = node.Properties.SingleOrDefault<TestMethodIdentifierProperty>();
var b = new Bundle();
Expand Down