You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Owen Nichols (Jira)" <ji...@apache.org> on 2022/06/22 20:47:03 UTC

[jira] [Closed] (GEODE-6143) PowerMock should not be used in Geode tests [PERMANENT]

     [ https://issues.apache.org/jira/browse/GEODE-6143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Owen Nichols closed GEODE-6143.
-------------------------------

> PowerMock should not be used in Geode tests [PERMANENT]
> -------------------------------------------------------
>
>                 Key: GEODE-6143
>                 URL: https://issues.apache.org/jira/browse/GEODE-6143
>             Project: Geode
>          Issue Type: Task
>          Components: build, tests
>            Reporter: Kirk Lund
>            Assignee: Kirk Lund
>            Priority: Major
>              Labels: GeodeOperationAPI, pull-request-available
>             Fix For: 1.15.0
>
>          Time Spent: 13h 10m
>  Remaining Estimate: 0h
>
> At least one usage of PowerMock in our unit tests is leaking and causing other tests to fail with the following stack.
> No further tests should be written using PowerMock and all tests that currently use it need to be identified and changed (along with product code refactoring) to not use PowerMock.
> We will then remove PowerMock as a dependency from Geode.
> {noformat}
> 2018-12-04 18:11:36,258 Distributed system shutdown hook ERROR Could not reconfigure JMX java.lang.LinkageError: loader constraint violation: loader (instance of org/powermock/core/classloader/MockClassLoader) previously initiated loading for a different type with name "javax/management/MBeanServer"
> 	at java.lang.ClassLoader.defineClass1(Native Method)
> 	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
> 	at org.powermock.core.classloader.MockClassLoader.loadUnmockedClass(MockClassLoader.java:262)
> 	at org.powermock.core.classloader.MockClassLoader.loadModifiedClass(MockClassLoader.java:206)
> 	at org.powermock.core.classloader.DeferSupportingClassLoader.loadClass1(DeferSupportingClassLoader.java:89)
> 	at org.powermock.core.classloader.DeferSupportingClassLoader.loadClass(DeferSupportingClassLoader.java:79)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> 	at org.apache.logging.log4j.core.jmx.Server.unregisterAllMatching(Server.java:337)
> 	at org.apache.logging.log4j.core.jmx.Server.unregisterLoggerContext(Server.java:261)
> 	at org.apache.logging.log4j.core.jmx.Server.reregisterMBeansAfterReconfigure(Server.java:165)
> 	at org.apache.logging.log4j.core.jmx.Server.reregisterMBeansAfterReconfigure(Server.java:141)
> 	at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:558)
> 	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:619)
> 	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:636)
> 	at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:231)
> 	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:243)
> 	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
> 	at org.apache.logging.log4j.LogManager.getContext(LogManager.java:174)
> 	at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:661)
> 	at org.apache.geode.internal.logging.LogService.getLogger(LogService.java:64)
> 	at org.apache.geode.internal.tcp.ConnectionTable.<clinit>(ConnectionTable.java:61)
> 	at org.apache.geode.distributed.DistributedSystem.setThreadsSocketPolicy(DistributedSystem.java:263)
> 	at org.apache.geode.distributed.internal.InternalDistributedSystem.lambda$static$0(InternalDistributedSystem.java:2317)
> 	at java.lang.Thread.run(Thread.java:748)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)