spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [spark] HeartSaVioR commented on pull request #29039: [WIP][SPARK-XXXXX] HiveSessionImplSuite flakiness fix via mocking instances earlier than initializing HiveSessionImpl
Date Wed, 08 Jul 2020 12:47:07 GMT

HeartSaVioR commented on pull request #29039:

   Rationalization: the failures always come from classloader issue;
   sbt.ForkMain$ForkError: org.mockito.exceptions.base.MockitoException: 
   ClassCastException occurred while creating the mockito mock :
     class to mock : 'org.apache.hive.service.cli.session.SessionManager', loaded by classloader
: 'sun.misc.Launcher$AppClassLoader@2d6d8735'
     created class : 'org.mockito.codegen.SessionManager$MockitoMock$2028320452', loaded by
classloader : 'net.bytebuddy.dynamic.loading.MultipleParentClassLoader@4058f9df'
     proxy instance class : 'org.mockito.codegen.SessionManager$MockitoMock$2028320452', loaded
by classloader : 'net.bytebuddy.dynamic.loading.MultipleParentClassLoader@4058f9df'
     instance creation by : ObjenesisInstantiator
   You might experience classloading issues, please ask the mockito mailing-list.
   	at org.apache.spark.sql.hive.thriftserver.HiveSessionImplSuite.beforeAll(HiveSessionImplSuite.scala:44)
   	at org.scalatest.BeforeAndAfterAll.liftedTree1$1(BeforeAndAfterAll.scala:212)
   	at sbt.ForkMain$Run$
   	at sbt.ForkMain$Run$
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(
   	at java.util.concurrent.ThreadPoolExecutor$
   Caused by: sbt.ForkMain$ForkError: java.lang.ClassCastException: org.mockito.codegen.SessionManager$MockitoMock$2028320452
cannot be cast to org.mockito.internal.creation.bytebuddy.MockAccess
   	at org.mockito.internal.creation.bytebuddy.SubclassByteBuddyMockMaker.createMock(
   	at org.mockito.internal.creation.bytebuddy.ByteBuddyMockMaker.createMock(
   	at org.mockito.internal.util.MockUtil.createMock(
   	at org.mockito.internal.MockitoCore.mock(
   	at org.mockito.Mockito.mock(
   	at org.mockito.Mockito.mock(
   	... 13 more
   while I don't have clear idea what is happening, there's no part possibly dealing with
classloader, except initializing `HiveSessionImpl` (only suspect, no clear evidence yet).
This patch is to verify the idea that mocking instances before initializing HiveSessionImpl
would avoid the classloader issue.
   It's less flaky then CliSuite and only checked once per build, so to verify multiple times
I just create 9 duplicated suites to test 10 times per build.

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message