You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a top level framework testify should not be bundled with a SLF4J implementation. Currently Testify bundles Logback which causes an error in the event Logback version is not supported by Testify. Instead of the current implementation Testify should instead:
Remove dependency on Logback
Determine if there is a SLF4J implementation in the classpath and if there is use it.
If no implementation of SL4J is found in the classpath fallback to an internal logging implementation.
The motivation for doing this work is to insure testify doesn't fail due to Logback implementation issues. For example:
Failed to instantiate [ch.qos.logback.classic.LoggerContext]
Reported exception:
java.lang.AbstractMethodError: ch.qos.logback.classic.pattern.EnsureExceptionHandling.process(Lch/qos/logback/core/Context;Lch/qos/logback/core/pattern/Converter;)V
at ch.qos.logback.core.pattern.PatternLayoutBase.start(PatternLayoutBase.java:85)
at ch.qos.logback.classic.encoder.PatternLayoutEncoder.start(PatternLayoutEncoder.java:28)
at ch.qos.logback.classic.BasicConfigurator.configure(BasicConfigurator.java:50)
at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:164)
at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85)
at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
at org.testifyproject.core.util.LoggingUtil.<clinit>(LoggingUtil.java:38)
at org.testifyproject.core.util.ExceptionUtil.<clinit>(ExceptionUtil.java:30)
at org.testifyproject.core.util.ServiceLocatorUtil.insureNotEmpty(ServiceLocatorUtil.java:348)
at org.testifyproject.core.util.ServiceLocatorUtil.getAll(ServiceLocatorUtil.java:315)
at org.testifyproject.core.analyzer.TestClassAnalyzer.visitAnnotation(TestClassAnalyzer.java:74)
at org.testifyproject.asm.ClassReader.accept(Unknown Source)
at org.testifyproject.asm.ClassReader.accept(Unknown Source)
at org.testifyproject.core.util.AnalyzerUtil.lambda$analyzeTestClass$0(AnalyzerUtil.java:63)
at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
at org.testifyproject.core.util.AnalyzerUtil.analyzeTestClass(AnalyzerUtil.java:55)
at org.testifyproject.junit4.core.TestifyJUnit4CategoryFilter.shouldRun(TestifyJUnit4CategoryFilter.java:60)
at org.junit.runners.ParentRunner.shouldRun(ParentRunner.java:434)
at org.junit.runners.ParentRunner.filter(ParentRunner.java:382)
at org.testifyproject.junit4.core.TestifyJUnit4TestRunner.<init>(TestifyJUnit4TestRunner.java:85)
at org.testifyproject.junit4.UnitTest.<init>(UnitTest.java:40)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:262)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
The text was updated successfully, but these errors were encountered:
As a top level framework testify should not be bundled with a SLF4J implementation. Currently Testify bundles Logback which causes an error in the event Logback version is not supported by Testify. Instead of the current implementation Testify should instead:
The motivation for doing this work is to insure testify doesn't fail due to Logback implementation issues. For example:
The text was updated successfully, but these errors were encountered: