Skip to content

Commit

Permalink
Adding .ConfigureAwait
Browse files Browse the repository at this point in the history
Signed-off-by: André Silva <[email protected]>
  • Loading branch information
askpt committed Dec 31, 2024
1 parent 729bd65 commit 7f5af18
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions test/OpenFeature.Tests/Hooks/MetricsHookTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public async Task After_Test()
// Act
await metricsHook.AfterAsync(ctx,
new FlagEvaluationDetails<string>("my-flag", "foo", Constant.ErrorType.None, "STATIC", "default"),
new Dictionary<string, object>());
new Dictionary<string, object>()).ConfigureAwait(true);
this._meterProvider.ForceFlush();

// Assert metrics
Expand All @@ -75,7 +75,7 @@ public async Task Error_Test()
new ClientMetadata("my-client", "1.0"), new Metadata("my-provider"), evaluationContext);

// Act
await metricsHook.ErrorAsync(ctx, new Exception(), new Dictionary<string, object>());
await metricsHook.ErrorAsync(ctx, new Exception(), new Dictionary<string, object>()).ConfigureAwait(true);;
this._meterProvider.ForceFlush();

// Assert metrics
Expand All @@ -100,7 +100,7 @@ public async Task Finally_Test()
new ClientMetadata("my-client", "1.0"), new Metadata("my-provider"), evaluationContext);

// Act
await metricsHook.FinallyAsync(ctx, new Dictionary<string, object>());
await metricsHook.FinallyAsync(ctx, new Dictionary<string, object>()).ConfigureAwait(true);;
this._meterProvider.ForceFlush();

// Assert metrics
Expand All @@ -126,7 +126,7 @@ public async Task Before_Test()
new ClientMetadata("my-client", "1.0"), new Metadata("my-provider"), evaluationContext);

// Act
await metricsHook.BeforeAsync(ctx, new Dictionary<string, object>());
await metricsHook.BeforeAsync(ctx, new Dictionary<string, object>()).ConfigureAwait(true);;
this._meterProvider.ForceFlush();

// Assert metrics
Expand Down
8 changes: 4 additions & 4 deletions test/OpenFeature.Tests/Hooks/TracingHookTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public async Task TestAfter()
var span = this._tracer.StartActiveSpan("my-span");
await tracingHook.AfterAsync(ctx,
new FlagEvaluationDetails<string>("my-flag", "foo", Constant.ErrorType.None, "STATIC", "default"),
new Dictionary<string, object>());
new Dictionary<string, object>()).ConfigureAwait(true);;
span.End();

this._tracerProvider.ForceFlush();
Expand Down Expand Up @@ -84,7 +84,7 @@ public async Task TestAfter_NoSpan()
// Act
await tracingHook.AfterAsync(ctx,
new FlagEvaluationDetails<string>("my-flag", "foo", Constant.ErrorType.None, "STATIC", "default"),
new Dictionary<string, object>());
new Dictionary<string, object>()).ConfigureAwait(true);;

this._tracerProvider.ForceFlush();

Expand All @@ -104,7 +104,7 @@ public async Task TestError()
// Act
var span = this._tracer.StartActiveSpan("my-span");
await tracingHook.ErrorAsync(ctx, new Exception("unexpected error"),
new Dictionary<string, object>());
new Dictionary<string, object>()).ConfigureAwait(true);;
span.End();

this._tracerProvider.ForceFlush();
Expand Down Expand Up @@ -132,7 +132,7 @@ public async Task TestError_NoSpan()

// Act
await tracingHook.ErrorAsync(ctx, new Exception("unexpected error"),
new Dictionary<string, object>());
new Dictionary<string, object>()).ConfigureAwait(true);;

this._tracerProvider.ForceFlush();

Expand Down

0 comments on commit 7f5af18

Please sign in to comment.