Reproduction steps:
1. Open the attached “pipeline-set-result-repro.zip” project
2. Open the terminal and run the command unity command run_tests
3. Run the same command again
4. Observe the Console window
Actual result: InvalidOperationExceptions are thrown
Expected result: No errors are thrown
Reproducible with: 0.2.0-exp.2, 0.3.1-exp.1, 0.4.0-exp.1 (6000.0.0f1, 6000.0.81f1, 6000.3.21f1, 6000.5.7f1, 6000.6.0b7, 6000.7.0a4)
Reproducible on: Windows 11
Not reproducible on: No other environment tested
Notes:
- Unity CLI is required to reproduce the issue
- When a domain reload occurs, the symptom is mitigated and the exceptions no longer accumulate beyond two across repeated runs.
Errors:
- InvalidOperationException
System.Threading.Tasks.TaskCompletionSource`1[TResult].SetResult (TResult result) (at <d5163a1599e149b4a055e7ce92a906b2>:0)
Unity.Pipeline.Editor.Testing.PipelineTestRunner+<>c_DisplayClass8_0.<ExecuteTestsInternal>b_1 () (at ./Library/PackageCache/com.unity.pipeline@f49636739437/Editor/Testing/PipelineTestRunner.cs:329)
- InvalidOperationException
System.Threading.Tasks.TaskCompletionSource`1[TResult].SetResult (TResult result) (at <d5163a1599e149b4a055e7ce92a906b2>:0)
Unity.Pipeline.Editor.Testing.TestResultCollector.RunFinished (UnityEditor.TestTools.TestRunner.Api.ITestResultAdaptor result) (at ./Library/PackageCache/com.unity.pipeline@f49636739437/Editor/Testing/TestResultCollector.cs:88)