Skip to content

build(deps): bump xunit from 2.5.3 to 2.6.1#9378

Merged
yufeih merged 1 commit into
dotnet:mainfrom
filzrev:chore-update-xunit-version
Nov 5, 2023
Merged

build(deps): bump xunit from 2.5.3 to 2.6.1#9378
yufeih merged 1 commit into
dotnet:mainfrom
filzrev:chore-update-xunit-version

Conversation

@filzrev
Copy link
Copy Markdown
Collaborator

@filzrev filzrev commented Nov 3, 2023

What's included in this PR

  • Update xunit version from 2.5.3 to 2.6.1
  • Fix problems that cause StackOverflowException when upgraded xUnit package to 2.6.0 or later.

Background
It seems xUnit don't support Assert.Equal for object that contains circular reference.
For example. When executing following code. Test process crash with Stackoverflow. (Tested with version 2.5.3 / 2.6.0 / 2.6.1)

 var dict = new Dictionary<string, object>
 {
 };
 dict["Ref"] = dict; // Set circular reference to self
 Assert.Equals(dict, dict["Ref"]); // Cause StackOverflowException

I don't know what changes of xUnit 2.6.0 cause this problem Release Note
But it seems some assertion library changes cause above circular reference problem.

So I've changed Assert.Equals assertion logics to Assert.Same that test object reference equity.

@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 3, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

see 1 file with indirect coverage changes

📢 Thoughts on this report? Let us know!.

@yufeih yufeih added the bug-fix Makes the pull request to appear in "Bug Fixes" section of the next release note label Nov 5, 2023
Copy link
Copy Markdown
Contributor

@yufeih yufeih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @filzrev !

@yufeih yufeih merged commit 38d092d into dotnet:main Nov 5, 2023
p-kostov pushed a commit to ErpNetDocs/docfx that referenced this pull request Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix Makes the pull request to appear in "Bug Fixes" section of the next release note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants