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
GZoltar v1.7.4-SNAPSHOT (<= 14f7d65) reports a few extra non-expecting-triggering test cases on 102 bugs out of the 835 in D4J v2.0.0 (<= b8954f0). Here's the breakdown.
Wanted but not invoked:
inflater.end();
-> at org.apache.commons.compress.archivers.sevenz.SevenZNativeHeapTest.testEndInflaterOnCloseStream(SevenZNativeHeapTest.java:62)
Actually, there were zero interactions with this mock.
at org.apache.commons.compress.archivers.sevenz.SevenZNativeHeapTest.testEndInflaterOnCloseStream(SevenZNativeHeapTest.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:68)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.runTestMethod(PowerMockJUnit44RunnerDelegateImpl.java:310)
at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:88)
at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:96)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.executeTest(PowerMockJUnit44RunnerDelegateImpl.java:294)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.executeTestInSuper(PowerMockJUnit47RunnerDelegateImpl.java:127)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.executeTest(PowerMockJUnit47RunnerDelegateImpl.java:82)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.runBeforesThenTestThenAfters(PowerMockJUnit44RunnerDelegateImpl.java:282)
at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:86)
at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:49)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.invokeTestMethod(PowerMockJUnit44RunnerDelegateImpl.java:207)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.runMethods(PowerMockJUnit44RunnerDelegateImpl.java:146)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$1.run(PowerMockJUnit44RunnerDelegateImpl.java:120)
at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:33)
at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:45)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.run(PowerMockJUnit44RunnerDelegateImpl.java:122)
at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.run(JUnit4TestSuiteChunkerImpl.java:106)
at org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner.run(AbstractCommonPowerMockRunner.java:53)
at org.powermock.modules.junit4.PowerMockRunner.run(PowerMockRunner.java:59)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
at com.gzoltar.internal.core.test.junit.JUnitTestTask.call(JUnitTestTask.java:57)
at com.gzoltar.internal.core.test.junit.JUnitTestTask.call(JUnitTestTask.java:25)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:748)
org.mockito.exceptions.base.MockitoException:
Cannot mock/spy class com.fasterxml.jackson.databind.type.TypeFactory
Mockito cannot mock/spy following:
- final classes
- anonymous classes
- primitive types
at com.fasterxml.jackson.databind.type.TestTypeFactoryWithClassLoader.testUsesCorrectClassLoaderWhenThreadClassLoaderIsNull(TestTypeFactoryWithClassLoader.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:68)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.runTestMethod(PowerMockJUnit44RunnerDelegateImpl.java:310)
at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:88)
at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:96)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.executeTest(PowerMockJUnit44RunnerDelegateImpl.java:294)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.executeTestInSuper(PowerMockJUnit47RunnerDelegateImpl.java:127)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.executeTest(PowerMockJUnit47RunnerDelegateImpl.java:82)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.runBeforesThenTestThenAfters(PowerMockJUnit44RunnerDelegateImpl.java:282)
at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:86)
at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:49)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.invokeTestMethod(PowerMockJUnit44RunnerDelegateImpl.java:207)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.runMethods(PowerMockJUnit44RunnerDelegateImpl.java:146)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$1.run(PowerMockJUnit44RunnerDelegateImpl.java:120)
at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:33)
at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:45)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.run(PowerMockJUnit44RunnerDelegateImpl.java:122)
at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.run(JUnit4TestSuiteChunkerImpl.java:106)
at org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner.run(AbstractCommonPowerMockRunner.java:53)
at org.powermock.modules.junit4.PowerMockRunner.run(PowerMockRunner.java:59)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
at com.gzoltar.internal.core.test.junit.JUnitTestTask.call(JUnitTestTask.java:57)
at com.gzoltar.internal.core.test.junit.JUnitTestTask.call(JUnitTestTask.java:25)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:748)
Excluding com.fasterxml.jackson.databind.type.TypeFactory from being instrumented by GZoltar addresses this issue. 🤷♂️ Thus, I would suggest one to first investigate the bytecode produced by GZoltar for that particular class.
org.mockito.exceptions.base.MockitoException:
ClassCastException occurred while creating the mockito proxy :
class to mock : 'test.Interface1', loaded by classloader : 'org.mockitoutil.ClassLoaders$InMemoryClassLoader@109d5023'
created class : 'test.Interface1$$EnhancerByMockitoWithCGLIB$$65e49476', loaded by classloader : 'org.mockito.internal.creation.util.SearchingClassLoader@1d9508e1'
proxy instance class : null
instance creation by : ObjenesisInstantiator
You might experience classloading issues, disabling the Objenesis cache *might* help (see MockitoConfiguration)
at org.mockito.internal.creation.cglib.ClassImposterizer.imposterise(ClassImposterizer.java:61)
at org.mockito.internal.creation.cglib.ClassImposterizer.imposterise(ClassImposterizer.java:49)
at org.mockito.internal.creation.cglib.CglibMockMaker.createMock(CglibMockMaker.java:24)
at org.mockito.internal.util.MockUtil.createMock(MockUtil.java:33)
at org.mockito.internal.MockitoCore.mock(MockitoCore.java:59)
at org.mockito.Mockito.mock(Mockito.java:1285)
at org.mockitousage.basicapi.MockingMultipleInterfacesTest.should_mock_class_with_interfaces_of_different_class_loader_AND_different_classpaths(MockingMultipleInterfacesTest.java:108)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
at com.gzoltar.internal.core.test.junit.JUnitTestTask.call(JUnitTestTask.java:57)
at com.gzoltar.internal.core.test.junit.JUnitTestTask.call(JUnitTestTask.java:25)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassCastException: test.Interface1$$EnhancerByMockitoWithCGLIB$$65e49476 cannot be cast to org.mockito.cglib.proxy.Factory
at org.mockito.internal.creation.cglib.ClassImposterizer.createProxy(ClassImposterizer.java:143)
at org.mockito.internal.creation.cglib.ClassImposterizer.imposterise(ClassImposterizer.java:58)
... 29 more
java.lang.NoSuchMethodError: javax.xml.parsers.DocumentBuilderFactory.setIgnoringElementContentWhitespace(Z)V
at org.apache.commons.jxpath.xml.DOMParser.parseXML(DOMParser.java:40)
at org.apache.commons.jxpath.xml.DocumentContainer.parseXML(DocumentContainer.java:143)
at org.apache.commons.jxpath.xml.DocumentContainer.getValue(DocumentContainer.java:111)
at org.apache.commons.jxpath.ri.axes.TestBeanWithNode.createTestBeanWithDOM(TestBeanWithNode.java:58)
at org.apache.commons.jxpath.ri.axes.SimplePathInterpreterTest.setUp(SimplePathInterpreterTest.java:60)
at junit.framework.TestCase.runBare(TestCase.java:139)
at junit.framework.TestResult$1.protect(TestResult.java:122)
at junit.framework.TestResult.runProtected(TestResult.java:142)
at junit.framework.TestResult.run(TestResult.java:125)
at junit.framework.TestCase.run(TestCase.java:129)
at junit.framework.TestSuite.runTest(TestSuite.java:255)
at junit.framework.TestSuite.run(TestSuite.java:250)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
at com.gzoltar.internal.core.test.junit.JUnitTestTask.call(JUnitTestTask.java:57)
at com.gzoltar.internal.core.test.junit.JUnitTestTask.call(JUnitTestTask.java:25)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:748)
As far I understood, the javax.xml.parsers.DocumentBuilderFactory class is present in two jar files (target/lib/xml-apis-2.0.2.jar and target/lib/xerces-1.2.3.jar) and GZoltar's classloader ends up picking the incorrect one. 🤷♂️
The text was updated successfully, but these errors were encountered:
GZoltar v1.7.4-SNAPSHOT (<= 14f7d65) reports a few extra non-expecting-triggering test cases on 102 bugs out of the 835 in D4J v2.0.0 (<= b8954f0). Here's the breakdown.
Compress-36
org.apache.commons.compress.archivers.sevenz.SevenZNativeHeapTest#testEndInflaterOnCloseStream
org.apache.commons.compress.archivers.sevenz.SevenZNativeHeapTest#testEndDeflaterOnCloseStream
JacksonDatabind-{23,24,25,26,27,28,29,30,31,32,33,34,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57}
com.fasterxml.jackson.databind.type.TestTypeFactoryWithClassLoader#testThreadContextClassLoaderIsUsedIfNotUsingWithClassLoader
com.fasterxml.jackson.databind.type.TestTypeFactoryWithClassLoader#testUsesFallBackClassLoaderIfNoThreadClassLoaderAndNoWithClassLoader
com.fasterxml.jackson.databind.type.TestTypeFactoryWithClassLoader#testUsesCorrectClassLoaderWhenThreadClassLoaderIsNull
com.fasterxml.jackson.databind.type.TestTypeFactoryWithClassLoader#testUsesCorrectClassLoaderWhenThreadClassLoaderIsNotNull
Excluding
com.fasterxml.jackson.databind.type.TypeFactory
from being instrumented by GZoltar addresses this issue. 🤷♂️ Thus, I would suggest one to first investigate the bytecode produced by GZoltar for that particular class.Mockito-{6,7,8,9,10,11,21,22,23,24}
org.mockitousage.basicapi.MockingMultipleInterfacesTest#should_mock_class_with_interfaces_of_different_class_loader_AND_different_classpaths
JxPath-{1,2,3}
org.apache.commons.jxpath.ri.model.dom.DOMModelTest#testAxisChild
org.apache.commons.jxpath.ri.model.dom.DOMModelTest#testAxisAncestor
org.apache.commons.jxpath.ri.model.dom.DOMModelTest#testDefaultNamespaceIgnored
org.apache.commons.jxpath.ri.model.dom.DOMModelTest#testAxisAttribute
org.apache.commons.jxpath.ri.model.dom.DOMModelTest#testAxisChildIndexPredicate
org.apache.commons.jxpath.ri.model.dom.DOMModelTest#testLang
org.apache.commons.jxpath.ri.model.dom.DOMModelTest#testID
org.apache.commons.jxpath.ri.model.dom.DOMModelTest#testDocumentOrder
org.apache.commons.jxpath.ri.model.dom.DOMModelTest#testAxisParent
org.apache.commons.jxpath.ri.model.dom.DOMModelTest#testAxisFollowing
org.apache.commons.jxpath.ri.model.dom.DOMModelTest#testNodeTypeText
org.apache.commons.jxpath.ri.model.dom.DOMModelTest#testTypeConversions
org.apache.commons.jxpath.ri.model.dom.DOMModelTest#testAxisNamespace
org.apache.commons.jxpath.ri.model.dom.DOMModelTest#testElementInVariable
org.apache.commons.jxpath.ri.model.dom.DOMModelTest#testAxisSelf
org.apache.commons.jxpath.ri.model.dom.DOMModelTest#testContainer
org.apache.commons.jxpath.ri.model.dom.DOMModelTest#testNamespaceMapping
org.apache.commons.jxpath.ri.model.dom.DOMModelTest#testNodeTypeProcessingInstruction
org.apache.commons.jxpath.ri.model.dom.DOMModelTest#testRemovePath
org.apache.commons.jxpath.ri.model.dom.DOMModelTest#testCreatePathAndSetValue
org.apache.commons.jxpath.ri.model.dom.DOMModelTest#testCreatePath
org.apache.commons.jxpath.ri.model.dom.DOMModelTest#testFunctionsLastAndPosition
org.apache.commons.jxpath.ri.model.dom.DOMModelTest#testAxisPrecedingSibling
org.apache.commons.jxpath.ri.model.dom.DOMModelTest#testBooleanFunction
org.apache.commons.jxpath.ri.model.dom.DOMModelTest#testAxisDescendant
org.apache.commons.jxpath.ri.model.dom.DOMModelTest#testAxisFollowingSibling
org.apache.commons.jxpath.ri.model.dom.DOMModelTest#testDocument
org.apache.commons.jxpath.ri.model.dom.DOMModelTest#testAxisAncestorOrSelf
org.apache.commons.jxpath.ri.model.dom.DOMModelTest#testNodeTypeComment
org.apache.commons.jxpath.ri.model.dom.DOMModelTest#testSetValue
org.apache.commons.jxpath.ri.model.MixedModelTest#testListElement
org.apache.commons.jxpath.ri.model.MixedModelTest#testBeanContainer
org.apache.commons.jxpath.ri.model.MixedModelTest#testIteratePointersArrayElementWithVariable
org.apache.commons.jxpath.ri.model.MixedModelTest#testCollectionPointer
org.apache.commons.jxpath.ri.model.MixedModelTest#testVar
org.apache.commons.jxpath.ri.model.MixedModelTest#testListDocument
org.apache.commons.jxpath.ri.model.MixedModelTest#testNull
org.apache.commons.jxpath.ri.model.MixedModelTest#testListPrimitive
org.apache.commons.jxpath.ri.model.MixedModelTest#testMapPrimitive
org.apache.commons.jxpath.ri.model.MixedModelTest#testBeanMap
org.apache.commons.jxpath.ri.model.MixedModelTest#testVarElement
org.apache.commons.jxpath.ri.model.MixedModelTest#testMapDocument
org.apache.commons.jxpath.ri.model.MixedModelTest#testListMap
org.apache.commons.jxpath.ri.model.MixedModelTest#testVarBean
org.apache.commons.jxpath.ri.model.MixedModelTest#testVarList
org.apache.commons.jxpath.ri.model.MixedModelTest#testIterateVector
org.apache.commons.jxpath.ri.model.MixedModelTest#testErrorProperty
org.apache.commons.jxpath.ri.model.MixedModelTest#testVarPrimitive
org.apache.commons.jxpath.ri.model.MixedModelTest#testIteratePointersArray
org.apache.commons.jxpath.ri.model.MixedModelTest#testBeanElement
org.apache.commons.jxpath.ri.model.MixedModelTest#testRootAsCollection
org.apache.commons.jxpath.ri.model.MixedModelTest#testMapBean
org.apache.commons.jxpath.ri.model.MixedModelTest#testMapList
org.apache.commons.jxpath.ri.model.MixedModelTest#testCreatePath
org.apache.commons.jxpath.ri.model.MixedModelTest#testListContainer
org.apache.commons.jxpath.ri.model.MixedModelTest#testMapContainer
org.apache.commons.jxpath.ri.model.MixedModelTest#testBeanPrimitive
org.apache.commons.jxpath.ri.model.MixedModelTest#testVarDocument
org.apache.commons.jxpath.ri.model.MixedModelTest#testIterateArray
org.apache.commons.jxpath.ri.model.MixedModelTest#testVarContainer
org.apache.commons.jxpath.ri.model.MixedModelTest#testMapMap
org.apache.commons.jxpath.ri.model.MixedModelTest#testMatrix
org.apache.commons.jxpath.ri.model.MixedModelTest#testBeanDocument
org.apache.commons.jxpath.ri.model.MixedModelTest#testVarMap
org.apache.commons.jxpath.ri.model.MixedModelTest#testCreatePathAndSetValueWithMatrix
org.apache.commons.jxpath.ri.model.MixedModelTest#testMapElement
org.apache.commons.jxpath.ri.model.MixedModelTest#testBeanBean
org.apache.commons.jxpath.ri.model.MixedModelTest#testBeanList
org.apache.commons.jxpath.ri.model.MixedModelTest#testListBean
org.apache.commons.jxpath.ri.model.MixedModelTest#testListList
org.apache.commons.jxpath.ri.compiler.CoreFunctionTest#testIDFunction
org.apache.commons.jxpath.ri.compiler.CoreFunctionTest#testKeyFunction
org.apache.commons.jxpath.ri.compiler.CoreFunctionTest#testFormatNumberFunction
org.apache.commons.jxpath.ri.compiler.CoreFunctionTest#testCoreFunctions
org.apache.commons.jxpath.ri.axes.SimplePathInterpreterTest#testDoStepNoPredicatesPropertyOwner
org.apache.commons.jxpath.ri.axes.SimplePathInterpreterTest#testDoPredicateName
org.apache.commons.jxpath.ri.axes.SimplePathInterpreterTest#testInterpretExpressionPath
org.apache.commons.jxpath.ri.axes.SimplePathInterpreterTest#testDoStepPredicatesPropertyOwner
org.apache.commons.jxpath.ri.axes.SimplePathInterpreterTest#testDoStepNoPredicatesStandard
org.apache.commons.jxpath.ri.axes.SimplePathInterpreterTest#testDoStepPredicatesStandard
org.apache.commons.jxpath.ri.axes.SimplePathInterpreterTest#testDoPredicatesStandard
As far I understood, the
javax.xml.parsers.DocumentBuilderFactory
class is present in two jar files (target/lib/xml-apis-2.0.2.jar
andtarget/lib/xerces-1.2.3.jar
) and GZoltar's classloader ends up picking the incorrect one. 🤷♂️The text was updated successfully, but these errors were encountered: