Skip to content

Improve error reporting in edge cases. #282

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

Merged
merged 1 commit into from
Dec 11, 2019

Conversation

drodriguez
Copy link
Contributor

When a failure happens after the test suite has stopped (or started),
the failure message included the description of the class XCTestRun or
XCTestCaseRun, which is the default description.

Since those errors are difficult to trace back, instead of logging an
unhelpful source/line location pointing to the inside of XCTest, log the
additional information passed in into the method, to help the user to
locate their error.

I have tried to provide a test that shows the message itself, but I have been unable to create one. I'm pretty sure I have seen this error when a completion callback is invoked after the test has finished, but I cannot reproduce it in the test suite.

@stmontgomery
Copy link
Contributor

@swift-ci Please test

@drodriguez
Copy link
Contributor Author

I can try to have a look at the OS X error later, but seems that it is not introduced by this PR. The Linux error is completely unrelated, if I read correctly. I will try to have a look later.

When a failure happens after the test suite has stopped (or started),
the failure message included the description of the class XCTestRun or
XCTestCaseRun, which is the default description.

Since those errors are difficult to trace back, instead of logging an
unhelpful source/line location pointing to the inside of XCTest, log the
additional information passed in into the method, to help the user to
locate their error.
@drodriguez
Copy link
Contributor Author

Just rebased on top of current master, but I don't get the errors that CI was showing.

@swift-ci please test

@drodriguez
Copy link
Contributor Author

Seems that I don't have CI invoking rights in this repository. Someone will need to test and merge this for me. Thanks!

@stmontgomery
Copy link
Contributor

@swift-ci Please test

@stmontgomery
Copy link
Contributor

Hey @drodriguez, I finally had time to investigate this, and believe the CI failures aren't related to your PR but have been failing for a little while recently. I posted a PR which will hopefully resolve them here: #292

@drodriguez
Copy link
Contributor Author

Thanks for looking into it!

@spevans
Copy link
Contributor

spevans commented Dec 6, 2019

@swift-ci test

@stmontgomery
Copy link
Contributor

@swift-ci Please test

@stmontgomery
Copy link
Contributor

I've been working with @shahmishal to fix the CI blocking issue here, so trying this again:

@swift-ci Please test

@stmontgomery
Copy link
Contributor

@swift-ci Please test

@stmontgomery stmontgomery merged commit 0541fa8 into swiftlang:master Dec 11, 2019
@drodriguez drodriguez deleted the better-fatal-error branch December 11, 2019 19:27
@drodriguez
Copy link
Contributor Author

Double thanks!

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

Successfully merging this pull request may close these issues.

4 participants