]
Katia Aresti updated ISPN-12255:
--------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
spring-boot-starter tests do not run
------------------------------------
Key: ISPN-12255
URL:
https://issues.redhat.com/browse/ISPN-12255
Project: Infinispan
Issue Type: Bug
Components: Spring Integration, Test Suite
Affects Versions: 12.0.0.Dev02
Reporter: Dan Berindei
Assignee: Dan Berindei
Priority: Major
Labels: testsuite_stability
Fix For: 12.0.0.Dev03
The tests fail to start because log4j2 logging is redirected to slf4j and slf4j is
redirected back to log4j2:
{noformat}
[ERROR] test.infinispan.autoconfigure.CacheManagerTest Time elapsed: 0.316 s
<<< ERROR!
java.lang.ExceptionInInitializerError
at
org.junit.jupiter.engine.execution.ExtensionValuesStore.lambda$getOrComputeIfAbsent$0(ExtensionValuesStore.java:81)
at
org.junit.jupiter.engine.execution.ExtensionValuesStore$MemoizingSupplier.get(ExtensionValuesStore.java:182)
at
org.junit.jupiter.engine.execution.ExtensionValuesStore.getOrComputeIfAbsent(ExtensionValuesStore.java:84)
at
org.junit.jupiter.engine.execution.ExtensionValuesStore.getOrComputeIfAbsent(ExtensionValuesStore.java:88)
at
org.junit.jupiter.engine.execution.NamespaceAwareStore.getOrComputeIfAbsent(NamespaceAwareStore.java:61)
at
org.springframework.test.context.junit.jupiter.SpringExtension.getTestContextManager(SpringExtension.java:213)
at
org.springframework.test.context.junit.jupiter.SpringExtension.beforeAll(SpringExtension.java:77)
at
org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$7(ClassBasedTestDescriptor.java:359)
at
org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at
org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllCallbacks(ClassBasedTestDescriptor.java:359)
...
Caused by: org.apache.logging.log4j.LoggingException: log4j-slf4j-impl cannot be present
with log4j-to-slf4j
at
org.apache.logging.slf4j.Log4jLoggerFactory.validateContext(Log4jLoggerFactory.java:49)
at org.apache.logging.slf4j.Log4jLoggerFactory.newLogger(Log4jLoggerFactory.java:39)
at org.apache.logging.slf4j.Log4jLoggerFactory.newLogger(Log4jLoggerFactory.java:30)
at
org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:54)
at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:30)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:358)
at
org.apache.commons.logging.LogAdapter$Slf4jAdapter.createLocationAwareLog(LogAdapter.java:130)
at org.apache.commons.logging.LogAdapter.createLog(LogAdapter.java:91)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:67)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:59)
at
org.springframework.test.context.TestContextManager.<clinit>(TestContextManager.java:92)
{noformat}
The failure is hidden in Jenkins with surefire 3.0.0-M4 (Maven only says that the 0 tests
ran), but appears (without any description) after the upgrade to 3.0.0-M5.