Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-2652

Fix PageCursorProviderImplTest on IBM JVM

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.12.0
    • None
    • None

    Description

      During the execution of org.apache.activemq.artemis.core.paging.cursor.impl.PageCursorProviderImplTest using IBM JDK I got an exception:

      Underlying exception : org.mockito.exceptions.base.MockitoException: Could not modify all classes [interface java.lang.Comparable, class org.apache.activemq.artemis.core.paging.impl.Page, class java.lang.Object]
      
      	at org.apache.activemq.artemis.core.paging.cursor.impl.PageCursorProviderImplTest.shouldAllowConcurrentPageReads(PageCursorProviderImplTest.java:48)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
      	at java.lang.reflect.Method.invoke(Method.java:508)
      	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.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)
      Caused by: org.mockito.exceptions.base.MockitoException: Could not modify all classes [interface java.lang.Comparable, class org.apache.activemq.artemis.core.paging.impl.Page, class java.lang.Object]
      	at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:152)
      	at net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:365)
      	at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:174)
      	at net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:376)
      	... 10 more
      Caused by: java.lang.instrument.UnmodifiableClassException
      	at sun.instrument.InstrumentationImpl.retransformClasses0(Native Method)
      	at sun.instrument.InstrumentationImpl.retransformClasses(InstrumentationImpl.java:163)
      	at org.mockito.internal.creation.bytebuddy.InlineBytecodeGenerator.triggerRetransformation(InlineBytecodeGenerator.java:174)
      	at org.mockito.internal.creation.bytebuddy.InlineBytecodeGenerator.mockClass(InlineBytecodeGenerator.java:153)
      	at org.mockito.internal.creation.bytebuddy.TypeCachingBytecodeGenerator$1.call(TypeCachingBytecodeGenerator.java:37)
      	at org.mockito.internal.creation.bytebuddy.TypeCachingBytecodeGenerator$1.call(TypeCachingBytecodeGenerator.java:34)
      	at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:152)
      	at net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:365)
      	at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:174)
      	at net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:376)
      	at org.mockito.internal.creation.bytebuddy.TypeCachingBytecodeGenerator.mockClass(TypeCachingBytecodeGenerator.java:32)
      	at org.mockito.internal.creation.bytebuddy.InlineByteBuddyMockMaker.createMockType(InlineByteBuddyMockMaker.java:197)
      	at org.mockito.internal.creation.bytebuddy.InlineByteBuddyMockMaker.createMock(InlineByteBuddyMockMaker.java:178)
      	at org.mockito.internal.util.MockUtil.createMock(MockUtil.java:35)
      	at org.mockito.internal.MockitoCore.mock(MockitoCore.java:62)
      	at org.mockito.Mockito.mock(Mockito.java:1907)
      	at org.mockito.Mockito.mock(Mockito.java:1816)
      	... 10 more
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              brusdev Domenico Francesco Bruscino
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m