Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix unit test clean context #313

Merged
merged 2 commits into from
Nov 11, 2024
Merged

Conversation

askpt
Copy link
Member

@askpt askpt commented Nov 11, 2024

This PR

  • It fixes an issue where the context sometimes needs to be cleared correctly.
  • It should eliminate any further race conditions in the unit tests.

Notes

Following an investigation on xUnit shared contexts, I found we should use IDisposable to clear data between tests. See https://xunit.net/docs/shared-context for reference.

Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com>
Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com>
@askpt askpt marked this pull request as ready for review November 11, 2024 12:21
@askpt askpt requested a review from a team as a code owner November 11, 2024 12:21
@toddbaert toddbaert merged commit 3038142 into main Nov 11, 2024
12 checks passed
@askpt askpt deleted the askpt/fix-unit-test-sharing-data branch November 12, 2024 07:44
arttonoyan pushed a commit to arttonoyan/dotnet-sdk that referenced this pull request Nov 17, 2024
<!-- Please use this template for your pull request. -->
<!-- Please use the sections that you need and delete other sections -->

## This PR
<!-- add the description of the PR here -->

- It fixes an issue where the context sometimes needs to be cleared
correctly.
- It should eliminate any further race conditions in the unit tests.

### Notes
<!-- any additional notes for this PR -->
Following an investigation on xUnit shared contexts, I found we should
use `IDisposable` to clear data between tests. See
https://xunit.net/docs/shared-context for reference.

---------

Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com>
Signed-off-by: Artyom Tonoyan <artonoyan@servicetitan.com>
toddbaert pushed a commit that referenced this pull request Nov 18, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.1.0](v2.0.0...v2.1.0)
(2024-11-18)


### 🐛 Bug Fixes

* Fix action syntax in workflow configuration
([#315](#315))
([ccf0250](ccf0250))
* Fix unit test clean context
([#313](#313))
([3038142](3038142))


### ✨ New Features

* Add Dependency Injection and Hosting support for OpenFeature
([#310](#310))
([1aaa0ec](1aaa0ec))


### 🧹 Chore

* **deps:** update actions/upload-artifact action to v4.4.3
([#292](#292))
([9b693f7](9b693f7))
* **deps:** update codecov/codecov-action action to v4.6.0
([#306](#306))
([4b92528](4b92528))
* **deps:** update dependency dotnet-sdk to v8.0.401
([#296](#296))
([0bae29d](0bae29d))
* **deps:** update dependency fluentassertions to 6.12.2
([#302](#302))
([bc7e187](bc7e187))
* **deps:** update dependency microsoft.net.test.sdk to 17.11.0
([#297](#297))
([5593e19](5593e19))
* **deps:** update dependency microsoft.net.test.sdk to 17.11.1
([#301](#301))
([5b979d2](5b979d2))
* **deps:** update dependency nsubstitute to 5.3.0
([#311](#311))
([87f9cfa](87f9cfa))
* **deps:** update dependency xunit to 2.9.2
([#303](#303))
([2273948](2273948))
* **deps:** update dotnet monorepo
([#305](#305))
([3955b16](3955b16))
* **deps:** update dotnet monorepo to 8.0.2
([#319](#319))
([94681f3](94681f3))
* update release please config
([#304](#304))
([c471c06](c471c06))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
askpt added a commit that referenced this pull request Dec 4, 2024
<!-- Please use this template for your pull request. -->
<!-- Please use the sections that you need and delete other sections -->

## This PR
<!-- add the description of the PR here -->

- It fixes an issue where the context sometimes needs to be cleared
correctly.
- It should eliminate any further race conditions in the unit tests.

### Notes
<!-- any additional notes for this PR -->
Following an investigation on xUnit shared contexts, I found we should
use `IDisposable` to clear data between tests. See
https://xunit.net/docs/shared-context for reference.

---------

Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com>
askpt pushed a commit that referenced this pull request Dec 4, 2024
🤖 I have created a release *beep* *boop*
---

##
[2.1.0](v2.0.0...v2.1.0)
(2024-11-18)

### 🐛 Bug Fixes

* Fix action syntax in workflow configuration
([#315](#315))
([ccf0250](ccf0250))
* Fix unit test clean context
([#313](#313))
([3038142](3038142))

### ✨ New Features

* Add Dependency Injection and Hosting support for OpenFeature
([#310](#310))
([1aaa0ec](1aaa0ec))

### 🧹 Chore

* **deps:** update actions/upload-artifact action to v4.4.3
([#292](#292))
([9b693f7](9b693f7))
* **deps:** update codecov/codecov-action action to v4.6.0
([#306](#306))
([4b92528](4b92528))
* **deps:** update dependency dotnet-sdk to v8.0.401
([#296](#296))
([0bae29d](0bae29d))
* **deps:** update dependency fluentassertions to 6.12.2
([#302](#302))
([bc7e187](bc7e187))
* **deps:** update dependency microsoft.net.test.sdk to 17.11.0
([#297](#297))
([5593e19](5593e19))
* **deps:** update dependency microsoft.net.test.sdk to 17.11.1
([#301](#301))
([5b979d2](5b979d2))
* **deps:** update dependency nsubstitute to 5.3.0
([#311](#311))
([87f9cfa](87f9cfa))
* **deps:** update dependency xunit to 2.9.2
([#303](#303))
([2273948](2273948))
* **deps:** update dotnet monorepo
([#305](#305))
([3955b16](3955b16))
* **deps:** update dotnet monorepo to 8.0.2
([#319](#319))
([94681f3](94681f3))
* update release please config
([#304](#304))
([c471c06](c471c06))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants