-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
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#testEndInflaterOnCloseStreamorg.apache.commons.compress.archivers.sevenz.SevenZNativeHeapTest#testEndDeflaterOnCloseStream
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)
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#testThreadContextClassLoaderIsUsedIfNotUsingWithClassLoadercom.fasterxml.jackson.databind.type.TestTypeFactoryWithClassLoader#testUsesFallBackClassLoaderIfNoThreadClassLoaderAndNoWithClassLoadercom.fasterxml.jackson.databind.type.TestTypeFactoryWithClassLoader#testUsesCorrectClassLoaderWhenThreadClassLoaderIsNullcom.fasterxml.jackson.databind.type.TestTypeFactoryWithClassLoader#testUsesCorrectClassLoaderWhenThreadClassLoaderIsNotNull
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.
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
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
JxPath-{1,2,3}
org.apache.commons.jxpath.ri.model.dom.DOMModelTest#testAxisChildorg.apache.commons.jxpath.ri.model.dom.DOMModelTest#testAxisAncestororg.apache.commons.jxpath.ri.model.dom.DOMModelTest#testDefaultNamespaceIgnoredorg.apache.commons.jxpath.ri.model.dom.DOMModelTest#testAxisAttributeorg.apache.commons.jxpath.ri.model.dom.DOMModelTest#testAxisChildIndexPredicateorg.apache.commons.jxpath.ri.model.dom.DOMModelTest#testLangorg.apache.commons.jxpath.ri.model.dom.DOMModelTest#testIDorg.apache.commons.jxpath.ri.model.dom.DOMModelTest#testDocumentOrderorg.apache.commons.jxpath.ri.model.dom.DOMModelTest#testAxisParentorg.apache.commons.jxpath.ri.model.dom.DOMModelTest#testAxisFollowingorg.apache.commons.jxpath.ri.model.dom.DOMModelTest#testNodeTypeTextorg.apache.commons.jxpath.ri.model.dom.DOMModelTest#testTypeConversionsorg.apache.commons.jxpath.ri.model.dom.DOMModelTest#testAxisNamespaceorg.apache.commons.jxpath.ri.model.dom.DOMModelTest#testElementInVariableorg.apache.commons.jxpath.ri.model.dom.DOMModelTest#testAxisSelforg.apache.commons.jxpath.ri.model.dom.DOMModelTest#testContainerorg.apache.commons.jxpath.ri.model.dom.DOMModelTest#testNamespaceMappingorg.apache.commons.jxpath.ri.model.dom.DOMModelTest#testNodeTypeProcessingInstructionorg.apache.commons.jxpath.ri.model.dom.DOMModelTest#testRemovePathorg.apache.commons.jxpath.ri.model.dom.DOMModelTest#testCreatePathAndSetValueorg.apache.commons.jxpath.ri.model.dom.DOMModelTest#testCreatePathorg.apache.commons.jxpath.ri.model.dom.DOMModelTest#testFunctionsLastAndPositionorg.apache.commons.jxpath.ri.model.dom.DOMModelTest#testAxisPrecedingSiblingorg.apache.commons.jxpath.ri.model.dom.DOMModelTest#testBooleanFunctionorg.apache.commons.jxpath.ri.model.dom.DOMModelTest#testAxisDescendantorg.apache.commons.jxpath.ri.model.dom.DOMModelTest#testAxisFollowingSiblingorg.apache.commons.jxpath.ri.model.dom.DOMModelTest#testDocumentorg.apache.commons.jxpath.ri.model.dom.DOMModelTest#testAxisAncestorOrSelforg.apache.commons.jxpath.ri.model.dom.DOMModelTest#testNodeTypeCommentorg.apache.commons.jxpath.ri.model.dom.DOMModelTest#testSetValueorg.apache.commons.jxpath.ri.model.MixedModelTest#testListElementorg.apache.commons.jxpath.ri.model.MixedModelTest#testBeanContainerorg.apache.commons.jxpath.ri.model.MixedModelTest#testIteratePointersArrayElementWithVariableorg.apache.commons.jxpath.ri.model.MixedModelTest#testCollectionPointerorg.apache.commons.jxpath.ri.model.MixedModelTest#testVarorg.apache.commons.jxpath.ri.model.MixedModelTest#testListDocumentorg.apache.commons.jxpath.ri.model.MixedModelTest#testNullorg.apache.commons.jxpath.ri.model.MixedModelTest#testListPrimitiveorg.apache.commons.jxpath.ri.model.MixedModelTest#testMapPrimitiveorg.apache.commons.jxpath.ri.model.MixedModelTest#testBeanMaporg.apache.commons.jxpath.ri.model.MixedModelTest#testVarElementorg.apache.commons.jxpath.ri.model.MixedModelTest#testMapDocumentorg.apache.commons.jxpath.ri.model.MixedModelTest#testListMaporg.apache.commons.jxpath.ri.model.MixedModelTest#testVarBeanorg.apache.commons.jxpath.ri.model.MixedModelTest#testVarListorg.apache.commons.jxpath.ri.model.MixedModelTest#testIterateVectororg.apache.commons.jxpath.ri.model.MixedModelTest#testErrorPropertyorg.apache.commons.jxpath.ri.model.MixedModelTest#testVarPrimitiveorg.apache.commons.jxpath.ri.model.MixedModelTest#testIteratePointersArrayorg.apache.commons.jxpath.ri.model.MixedModelTest#testBeanElementorg.apache.commons.jxpath.ri.model.MixedModelTest#testRootAsCollectionorg.apache.commons.jxpath.ri.model.MixedModelTest#testMapBeanorg.apache.commons.jxpath.ri.model.MixedModelTest#testMapListorg.apache.commons.jxpath.ri.model.MixedModelTest#testCreatePathorg.apache.commons.jxpath.ri.model.MixedModelTest#testListContainerorg.apache.commons.jxpath.ri.model.MixedModelTest#testMapContainerorg.apache.commons.jxpath.ri.model.MixedModelTest#testBeanPrimitiveorg.apache.commons.jxpath.ri.model.MixedModelTest#testVarDocumentorg.apache.commons.jxpath.ri.model.MixedModelTest#testIterateArrayorg.apache.commons.jxpath.ri.model.MixedModelTest#testVarContainerorg.apache.commons.jxpath.ri.model.MixedModelTest#testMapMaporg.apache.commons.jxpath.ri.model.MixedModelTest#testMatrixorg.apache.commons.jxpath.ri.model.MixedModelTest#testBeanDocumentorg.apache.commons.jxpath.ri.model.MixedModelTest#testVarMaporg.apache.commons.jxpath.ri.model.MixedModelTest#testCreatePathAndSetValueWithMatrixorg.apache.commons.jxpath.ri.model.MixedModelTest#testMapElementorg.apache.commons.jxpath.ri.model.MixedModelTest#testBeanBeanorg.apache.commons.jxpath.ri.model.MixedModelTest#testBeanListorg.apache.commons.jxpath.ri.model.MixedModelTest#testListBeanorg.apache.commons.jxpath.ri.model.MixedModelTest#testListListorg.apache.commons.jxpath.ri.compiler.CoreFunctionTest#testIDFunctionorg.apache.commons.jxpath.ri.compiler.CoreFunctionTest#testKeyFunctionorg.apache.commons.jxpath.ri.compiler.CoreFunctionTest#testFormatNumberFunctionorg.apache.commons.jxpath.ri.compiler.CoreFunctionTest#testCoreFunctionsorg.apache.commons.jxpath.ri.axes.SimplePathInterpreterTest#testDoStepNoPredicatesPropertyOwnerorg.apache.commons.jxpath.ri.axes.SimplePathInterpreterTest#testDoPredicateNameorg.apache.commons.jxpath.ri.axes.SimplePathInterpreterTest#testInterpretExpressionPathorg.apache.commons.jxpath.ri.axes.SimplePathInterpreterTest#testDoStepPredicatesPropertyOwnerorg.apache.commons.jxpath.ri.axes.SimplePathInterpreterTest#testDoStepNoPredicatesStandardorg.apache.commons.jxpath.ri.axes.SimplePathInterpreterTest#testDoStepPredicatesStandardorg.apache.commons.jxpath.ri.axes.SimplePathInterpreterTest#testDoPredicatesStandard- `org.apache.commons.jxpath.ri.axes.SimplePathInterpreterTest#testDoPredicateIndex
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. 🤷♂️
Metadata
Metadata
Assignees
Labels
No labels