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
- Font character thickness does not adjust properly in UI Toolkit text when changing Bold Weight in Font Asset
- Multiple "[...] is inaccessible due to its protection level" errors are thrown when opening project with Unity Version Control installed
- Sorting icons are tiny and misaligned in Import Activity window
- The Undo system does not record HideFlags.HideInHierarchy changes
- [Linux] Bug Reporter window is in Light mode when the Editor theme is Dark mode
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)