Search Issue Tracker
Third Party Issue
Third Party Issue in 2023.1.X
Votes
0
Found in
2020.3.39f1
2021.3.10f1
2022.1.17f1
2022.2.0b8
2023.1.0a10
Issue ID
UUM-14469
Regression
No
Test Framework Assert.Inconclusive does not work when used in Async Methods
How to reproduce:
1. Open the user-attached project “AssertInconclusiveTest”
2. Open Window → General → Test Runner
3. In the Test Runner Window click “Run All”
4. Observe the results
Expected results: All tests are Inconclusive
Actual result: The tests that are used in the Async Methods are returning either failed or succeeded result
Reproduced with: 2020.3.39f1, 2021.3.10f1, 2022.1.17f1, 2022.2.0b8, 2023.1.0a10
Reproduced on: Windows 11 Pro
Note: In Unity versions 2023.1.0a5-2023.1.0a10 running the tests causes Unity to freeze completely
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
Resolution Note:
Exceptions thrown within a task is invisible from the Unit test actually, and if you try to rethrow it using Task.Result or Task.Wait, it will be wrapped in an AggregatedException.
However once the task has run to completion, you can rethrow it's original exception using task.GetAwaiter().GetResults() (this is how async await propagate exceptions)
Resolution Note (2023.1.X):
Exceptions thrown within a task is invisible from the Unit test actually, and if you try to rethrow it using Task.Result or Task.Wait, it will be wrapped in an AggregatedException.
However once the task has run to completion, you can rethrow it's original exception using task.GetAwaiter().GetResults() (this is how async await propagate exceptions)