Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better handling of FailFast #666

Open
JVimes opened this issue Aug 5, 2019 · 4 comments
Open

Better handling of FailFast #666

JVimes opened this issue Aug 5, 2019 · 4 comments

Comments

@JVimes
Copy link

JVimes commented Aug 5, 2019

I'd like to discuss/suggest making the console runner handle FailFast better. FailFast writes an error message to the application event log and immediately kills the agent, so the runner does not receive the message. I see it called in 26 places in the .NET reference source, including in Invariant.Assert, which I ran into in MS production code.

When FailFast is called, the caller just sees NUnitEngineException: Remote test agent exited with non-zero exit code -2146232797 and SocketException : An existing connection was forcibly closed (full output here).

Suggestion: When -2146232797 is encountered, the runner could tell the user to check the application event log. Or the runner could retrieve the error message from the log.

I'm assuming -2146232797 always means FailFast was called. Googling for exit code -2146232797 returns mostly C# compiler bug reports that don't mention FailFast. I was confused and I think other users will be. Thanks to @mikkelbu for letting me know it's associated with FailFast.

@ChrisMaddock
Copy link
Member

@JVimes I like it - would you be willing to submit a pull request for this?

In terms of implementation, this very similar issue describes how I'd personally go about it: #391

@ChrisMaddock
Copy link
Member

Tagging low priority as this is an uncommon thing to hit, but we'd welcome the contribution none-the-less if you're willing, @JVimes

@JVimes
Copy link
Author

JVimes commented Aug 6, 2019

Thanks, Chris. I'm not invested enough in NUnit at the moment. Should I close this?

@mikkelbu
Copy link
Member

mikkelbu commented Aug 6, 2019

@JVimes Please keep it open, then other people can contribute. Thanks for reporting this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants