Consistently log exceptions from TestExecutionListeners at WARN level
Prior to this commit, the TestContextManager logged an exception from a TestExecutionListener at WARN level except in prepareTestInstance() where such an exception was logged at ERROR level (except for a skipped exception which is logged at INFO level). For consistency, this commit modifies TestContextManager so that it always logs non-skipped exceptions from TestExecutionListeners at WARN level. Closes gh-31688
This commit is contained in:
parent
b17f3bc07b
commit
97264c77dd
|
@ -268,8 +268,8 @@ public class TestContextManager {
|
|||
.formatted(typeName(testExecutionListener), testInstance), ex);
|
||||
}
|
||||
}
|
||||
else if (logger.isErrorEnabled()) {
|
||||
logger.error("""
|
||||
else if (logger.isWarnEnabled()) {
|
||||
logger.warn("""
|
||||
Caught exception while allowing TestExecutionListener [%s] to \
|
||||
prepare test instance [%s]"""
|
||||
.formatted(typeName(testExecutionListener), testInstance), ex);
|
||||
|
|
Loading…
Reference in New Issue