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

Ignored TestNG tests should not throw an exception #3570

Merged
merged 1 commit into from Nov 22, 2017
Merged

Ignored TestNG tests should not throw an exception #3570

merged 1 commit into from Nov 22, 2017

Conversation

tjni
Copy link
Contributor

@tjni tjni commented Nov 21, 2017

Issue: #3545

A bug in TestNG can cause the onAfterClass hook in a test listener to
run more than once for the same test class. This change will make sure
that Gradle handles this gracefully.

Gradle Core Team Checklist

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation
  • Recognize contributor in release notes

@bmuschko
Copy link
Contributor

Thanks for providing the pull request. I am going to have a look tomorrow.

@@ -74,4 +75,19 @@ class TestNGTestFrameworkIntegrationTest extends AbstractTestFrameworkIntegratio
String getFailingTestCaseName() {
return "fail"
}

@Issue("GRADLE-3545")
Copy link
Contributor

@bmuschko bmuschko Nov 21, 2017

Choose a reason for hiding this comment

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

Could you use the GitHub issue URL here and in the other places e.g. Issue("https://github.com/gradle/gradle/issues/3545")?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In retrospect, this makes a lot of sense. Updated!

Issue: #3545

A bug in TestNG can cause the onAfterClass hook in a test listener to
run more than once for the same test class. This change will make sure
that Gradle handles this gracefully.
@bmuschko bmuschko merged commit f41f760 into gradle:master Nov 22, 2017
@bmuschko
Copy link
Contributor

Thanks so much. It has been merged.

@bmuschko bmuschko changed the title Defend against NPE when running disabled tests. Ignored TestNG tests should not throw an exception Nov 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants