-
Notifications
You must be signed in to change notification settings - Fork 537
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MSBuildDeviceIntegration] Handle Debugger errors (#7864)
We occasionally see the following error on CI: Unhandled error launching soft debugger System.AggregateException: One or more errors occurred. (DWP Handshake failed.) ---> System.IO.IOException: DWP Handshake failed. at Mono.Debugger.Soft.Connection.Connect() in /Users/builder/azdo/_work/1/s/xamarin-android/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs:line 1361 at Mono.Debugger.Soft.VirtualMachine.connect() in /Users/builder/azdo/_work/1/s/xamarin-android/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs:line 381 at Mono.Debugger.Soft.VirtualMachineManager.Connect(Connection transport, StreamReader standardOutput, StreamReader standardError) in /Users/builder/azdo/_work/1/s/xamarin-android/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachineManager.cs:line 353 at Mono.Debugger.Soft.VirtualMachineManager.ConnectInternalAsync(Socket dbg_sock, Socket con_sock, IPEndPoint dbg_ep, IPEndPoint con_ep) in /Users/builder/azdo/_work/1/s/xamarin-android/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachineManager.cs:line 309 --- End of inner exception stack trace --- What is supposed to happen is the test should be retried. However, according to [the NUnit docs][1], the `[Retry]` attribute won't work if an unhandled exception occurs. Fix this by catching all exceptions and calling `Assert.Fail()` when an exception is caught. This allows the `[Retry]` attribute to do its job and retry the test. [1]: https://docs.nunit.org/articles/nunit/writing-tests/attributes/retry.html
- Loading branch information
1 parent
6508203
commit d174b9b
Showing
2 changed files
with
204 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.