Skip to content

Commit

Permalink
Bump the xunit group with 1 update (#1774)
Browse files Browse the repository at this point in the history
* Bump the xunit group with 1 update

Bumps the xunit group with 1 update: [xunit](https://github.com/xunit/xunit).

- [Commits](xunit/xunit@2.6.0...2.6.1)

---
updated-dependencies:
- dependency-name: xunit
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: xunit
...

Signed-off-by: dependabot[bot] <[email protected]>

* Remove xunit workaround

Remove workaround for `ValueTask` issue with xunit 2.6.0.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: martincostello <[email protected]>
  • Loading branch information
dependabot[bot] and martincostello authored Nov 3, 2023
1 parent 9e86a0a commit 61c959c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<PackageVersion Include="System.Threading.RateLimiting" Version="$(MicrosoftExtensionsVersion)" />
<PackageVersion Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageVersion Include="System.ValueTuple" Version="4.5.0" />
<PackageVersion Include="xunit" Version="2.6.0" />
<PackageVersion Include="xunit" Version="2.6.1" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.3" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework) == 'net6.0'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,11 @@ public async Task Disposed_EnsureThrows()
Assert.Throws<ObjectDisposedException>(() => controller.LastException);
Assert.Throws<ObjectDisposedException>(() => controller.LastHandledOutcome);

// xunit 2.6.0 has Func<ValueTask> and Func<Task> overloads that cause ambiguity which
// is messy to resolve for multiple different TFMs, so force the Task version to be used.
static async Task AssertThrowsObjectDisposedExceptionAsync(Func<Task> func)
=> await Assert.ThrowsAsync<ObjectDisposedException>(func);

await AssertThrowsObjectDisposedExceptionAsync(async () => await controller.CloseCircuitAsync(ResilienceContextPool.Shared.Get()));
await AssertThrowsObjectDisposedExceptionAsync(async () => await controller.IsolateCircuitAsync(ResilienceContextPool.Shared.Get()));
await AssertThrowsObjectDisposedExceptionAsync(async () => await controller.OnActionPreExecuteAsync(ResilienceContextPool.Shared.Get()));
await AssertThrowsObjectDisposedExceptionAsync(async () => await controller.OnActionSuccessAsync(Outcome.FromResult(10), ResilienceContextPool.Shared.Get()));
await AssertThrowsObjectDisposedExceptionAsync(async () => await controller.OnActionFailureAsync(Outcome.FromResult(10), ResilienceContextPool.Shared.Get()));
await Assert.ThrowsAsync<ObjectDisposedException>(async () => await controller.CloseCircuitAsync(ResilienceContextPool.Shared.Get()));
await Assert.ThrowsAsync<ObjectDisposedException>(async () => await controller.IsolateCircuitAsync(ResilienceContextPool.Shared.Get()));
await Assert.ThrowsAsync<ObjectDisposedException>(async () => await controller.OnActionPreExecuteAsync(ResilienceContextPool.Shared.Get()));
await Assert.ThrowsAsync<ObjectDisposedException>(async () => await controller.OnActionSuccessAsync(Outcome.FromResult(10), ResilienceContextPool.Shared.Get()));
await Assert.ThrowsAsync<ObjectDisposedException>(async () => await controller.OnActionFailureAsync(Outcome.FromResult(10), ResilienceContextPool.Shared.Get()));
}

[Fact]
Expand Down

0 comments on commit 61c959c

Please sign in to comment.