Commit b988d47
fix: Adding Async Lifetime method to fix flaky unit tests (open-feature#333)
<!-- 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 -->
- Changes the way we currently reset the Api between unit tests. This
approach should be safer since it calls the official `Shutdown`, and
when we call the API again, all the resources are reset.
### Notes
<!-- any additional notes for this PR -->
Check for more details:
https://xunit.net/docs/shared-context#:~:text=For%20context%20cleanup%2C%20add%20the%20IDisposable%20interface%20to,call%20IAsyncDisposable%20%28it%20is%20planned%20for%20xUnit%20v3%29.
---------
Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com>
Signed-off-by: Kyle Julian <38759683+kylejuliandev@users.noreply.github.com>1 parent 4bd9ca5 commit b988d47
File tree
2 files changed
+21
-7
lines changed- src/OpenFeature
- test/OpenFeature.Tests
2 files changed
+21
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
303 | 311 | | |
304 | 312 | | |
Lines changed: 12 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | | - | |
| 6 | + | |
6 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
7 | 15 | | |
8 | | - | |
| 16 | + | |
9 | 17 | | |
10 | | - | |
11 | | - | |
12 | | - | |
| 18 | + | |
13 | 19 | | |
14 | 20 | | |
0 commit comments