Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

Fix test failures #30

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

dbyron0
Copy link

@dbyron0 dbyron0 commented Jan 20, 2021

No description provided.

David Byron added 2 commits January 20, 2021 15:07
…ests to pass.

Before this (using version 2.0.44-beta), a mongodb:core test would fail:

Running ch.qos.logback.contrib.mongodb.MongoDBAppenderBaseTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.061 sec <<< FAILURE!
initializationError(ch.qos.logback.contrib.mongodb.MongoDBAppenderBaseTest)  Time elapsed: 0.004 sec  <<< ERROR!
java.lang.ExceptionInInitializerError
	at org.mockito.internal.exceptions.stacktrace.ConditionalStackTraceFilter.<init>(ConditionalStackTraceFilter.java:17)
	at org.mockito.exceptions.base.MockitoException.filterStackTrace(MockitoException.java:41)
	at org.mockito.exceptions.base.MockitoException.<init>(MockitoException.java:30)
	at org.mockito.internal.configuration.plugins.PluginLoader.loadPlugin(PluginLoader.java:35)
	at org.mockito.internal.configuration.plugins.PluginRegistry.<init>(PluginRegistry.java:13)
	at org.mockito.internal.configuration.plugins.Plugins.<clinit>(Plugins.java:12)
	at org.mockito.internal.util.MockUtil.<clinit>(MockUtil.java:23)
	at org.mockito.internal.stubbing.defaultanswers.ReturnsEmptyValues.<init>(ReturnsEmptyValues.java:57)
	at org.mockito.internal.stubbing.defaultanswers.ReturnsMoreEmptyValues.<init>(ReturnsMoreEmptyValues.java:51)
	at org.mockito.internal.stubbing.defaultanswers.ReturnsSmartNulls.<init>(ReturnsSmartNulls.java:40)
	at org.mockito.Answers.<clinit>(Answers.java:44)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at java.base/java.lang.Class.getEnumConstantsShared(Class.java:3553)
	at java.base/java.lang.Class.enumConstantDirectory(Class.java:3575)
	at java.base/java.lang.Enum.valueOf(Enum.java:234)
	at java.base/sun.reflect.annotation.AnnotationParser.parseEnumValue(AnnotationParser.java:484)
	at java.base/sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:348)
	at java.base/java.lang.reflect.Method.getDefaultValue(Method.java:674)
	at java.base/sun.reflect.annotation.AnnotationType.<init>(AnnotationType.java:132)
	at java.base/sun.reflect.annotation.AnnotationType.getInstance(AnnotationType.java:85)
	at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:267)
	at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:121)
	at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:73)
	at java.base/java.lang.reflect.Field.declaredAnnotations(Field.java:1175)
	at java.base/java.lang.reflect.Field.declaredAnnotations(Field.java:1173)
	at java.base/java.lang.reflect.Field.getDeclaredAnnotations(Field.java:1161)
	at java.base/java.lang.reflect.AccessibleObject.getAnnotations(AccessibleObject.java:533)
	at org.junit.runners.model.FrameworkField.getAnnotations(FrameworkField.java:21)
	at org.junit.runners.model.TestClass.addToAnnotationLists(TestClass.java:50)
	at org.junit.runners.model.TestClass.<init>(TestClass.java:43)
	at org.junit.runners.ParentRunner.<init>(ParentRunner.java:65)
	at org.junit.runners.BlockJUnit4ClassRunner.<init>(BlockJUnit4ClassRunner.java:58)
	at org.mockito.internal.runners.JUnit45AndHigherRunnerImpl$1.<init>(JUnit45AndHigherRunnerImpl.java:23)
	at org.mockito.internal.runners.JUnit45AndHigherRunnerImpl.<init>(JUnit45AndHigherRunnerImpl.java:23)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at org.mockito.internal.runners.util.RunnerProvider.newInstance(RunnerProvider.java:39)
	at org.mockito.internal.runners.RunnerFactory.create(RunnerFactory.java:28)
	at org.mockito.runners.MockitoJUnitRunner.<init>(MockitoJUnitRunner.java:57)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:31)
	at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:24)
	at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
	at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)
	at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
	at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:250)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: java.lang.NullPointerException
	at org.mockito.internal.configuration.plugins.Plugins.getStackTraceCleanerProvider(Plugins.java:18)
	at org.mockito.internal.exceptions.stacktrace.StackTraceFilter.<clinit>(StackTraceFilter.java:19)
	... 66 more

Results :

Tests in error:
  initializationError(ch.qos.logback.contrib.mongodb.MongoDBAppenderBaseTest)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant