Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public HedgingExecutionContextTests()
{
{ Exception: ApplicationException } => true,
{ Result: DisposableResult result } when result.Name == Handled => true,
_ => false
_ => false,
},
args => Generator(args));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public TaskExecutionTests()
{
{ Exception: ApplicationException } => true,
{ Result: DisposableResult result } when result.Name == Handled => true,
_ => false
_ => false,
}, args => Generator(args));

CreateSnapshot();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public void HandleMultipleResults_898()

// handle int results
{ Result: int res } when res == -1 => PredicateResult.True(),
_ => PredicateResult.False()
_ => PredicateResult.False(),
},
OnRetry = args =>
{
Expand Down
7 changes: 6 additions & 1 deletion test/Polly.TestUtils/FakeTelemetryListener.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
using Polly.Telemetry;

#if !NET10_0_OR_GREATER
#pragma warning disable SA1121
using Lock = System.Object;
Comment thread
martincostello marked this conversation as resolved.
#endif

namespace Polly.TestUtils;

public sealed class FakeTelemetryListener : TelemetryListener
{
private readonly Action<TelemetryEventArguments<object, object>> _callback;
private readonly object _syncRoot = new();
private readonly Lock _syncRoot = new();

public FakeTelemetryListener(Action<TelemetryEventArguments<object, object>> callback) => _callback = callback;

Expand Down
12 changes: 6 additions & 6 deletions test/Polly.TestUtils/TestUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ public static TelemetryEventArguments<object, object> AsObjectArguments<T, TArgs
_ => Outcome.FromResult<object>(args.Outcome!.Value.Result),
};

return new TelemetryEventArguments<object, object>(
args.Source,
args.Event,
args.Context,
args.Arguments!,
outcome);
return new(
args.Source,
args.Event,
args.Context,
args.Arguments!,
outcome);
}
}
Loading