Skip to content

+tck carry the original exception to fail(), helps tracking exceptions #148

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
Nov 28, 2014

Conversation

ktoso
Copy link
Contributor

@ktoso ktoso commented Nov 24, 2014

This improves the TCKs usability by carrying around the "original exception" to TestNG's fail().

Previously implementors would only get the message of their exception and would have to track down where exactly it came from manually in these cases. Now the original exception is seen as cause of the assertion error thrown by testng.

Would be great to include this in the RC1.

@@ -167,7 +167,7 @@ public void verifyNoAsyncErrors() {
if (e instanceof AssertionError) {
throw (AssertionError) e;
} else {
fail("Async error during test execution: " + e);
fail("Async error during test execution: " + e, e);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be explicit about e.getMessage here? (and perhaps enclose it in double-quotes)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea, fixing. I think the + e looked too much like an , e when re reading this hundred times, and I missed that it's swallowing the trace.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@viktorklang
Copy link
Contributor

@reactive-streams/contributors Usability-improvement to the TCK, please object before the 28th of November (this does not change the spec or any of the APIs in any way)

@ktoso ktoso force-pushed the impr-tck-stacktraces branch from 47b97c4 to aeeb961 Compare November 24, 2014 12:11
@ktoso
Copy link
Contributor Author

ktoso commented Nov 24, 2014

Updated

viktorklang added a commit that referenced this pull request Nov 28, 2014
+tck carry the original exception to fail(), helps tracking exceptions
@viktorklang viktorklang merged commit 5851bb7 into reactive-streams:master Nov 28, 2014
@ktoso ktoso deleted the impr-tck-stacktraces branch November 28, 2014 11:19
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.

2 participants