Fix EditorFeatures2 flakiness
The EditorFeatures2 flakiness was being caused by two separate issues. The first underlying problem is a simple bug in async completion. This issue is being tracked by the VS editor team here https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1091056 The second issue is how the Roslyn test framework handles unexpected extension exceptions. It was using a `FailFast` call when this happened vs. using `Assert.Fail` or similar. The reason being that at the point the unexpected exception is detected using `Assert.Fail` isn't effective because the editor is going to catch and swallow all exceptions. The `FailFast` is the only way to guarantee that the test will fail. The downside to `FailFast` though is that it doesn't produce actionable information. The xUnit process will simply exit with no stack trace, failure message, etc .... just a fail fast error code. This makes failures like this incredibly hard to track down. To fix this the `TestExtensionErrorHandler` will now store the unexpected `Exception` object and the containing workspace will look for it and fail the test in `Dispose`. This will reliably fail the tests that use `TestWorkspace` in this manner. closes #42586
Showing
想要评论请 注册 或 登录