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

Log test aborted/skipped exceptions at INFO level in the TestContext framework #31479

Closed
sbrannen opened this issue Oct 23, 2023 · 1 comment
Closed
Assignees
Labels
in: test Issues in the test module type: enhancement A general enhancement
Milestone

Comments

@sbrannen
Copy link
Member

Overview

Currently, any time an aborted/skipped exception is thrown by a TestExecutionListener, the TestContextManager unconditionally logs the exception at WARN level -- or ERROR level for prepareTestInstance() callbacks.

For the latter, an aborted/skipped exception is certainly not an ERROR, and in general the associated log output is very verbose (including a stack trace) and not something the user should be warned about it.

To improve the user experience, we should therefore log such exceptions at INFO level.

Test aborted/skipped exceptions

  • JUnit Jupiter: org.opentest4j.TestAbortedException
  • JUnit 4 org.junit.AssumptionViolatedException
  • TestNG: org.testng.SkipException

Related Issues

@sbrannen sbrannen added in: test Issues in the test module type: enhancement A general enhancement labels Oct 23, 2023
@sbrannen sbrannen added this to the 6.1.x milestone Oct 23, 2023
@sbrannen sbrannen self-assigned this Oct 23, 2023
@sbrannen sbrannen modified the milestones: 6.1.x, 6.1.2 Nov 25, 2023
@sbrannen
Copy link
Member Author

Reopening to ensure that GraalVM reflection hints are registered for skipped exception types.

@sbrannen sbrannen reopened this Nov 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: test Issues in the test module type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant