hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HBASE-2414) Enhance test suite to be able to specify distributed scenarios
Date Tue, 27 Apr 2010 19:26:31 GMT

    [ https://issues.apache.org/jira/browse/HBASE-2414?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12861507#action_12861507
] 

stack commented on HBASE-2414:
------------------------------

Trying to use powermock and mockito inside a minihbasecluster context I run into the following
issues (after struggling past similar around commons logging):

{code}

Testcase: testRegionCloseWhenNoMetaHBase2428 took 1.659 sec
        Caused an ERROR
loader constraint violation: loader (instance of org/powermock/core/classloader/MockClassLoader)
previously initiated loading for a different type with name "javax/management/MBeanServer"
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:700)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:545)
        at org.powermock.core.classloader.MockClassLoader.loadUnmockedClass(MockClassLoader.java:190)
        at org.powermock.core.classloader.MockClassLoader.loadModifiedClass(MockClassLoader.java:148)
        at org.powermock.core.classloader.DeferSupportingClassLoader.loadClass(DeferSupportingClassLoader.java:63)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:254)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:399)
        at org.apache.hadoop.metrics.util.MBeanUtil.registerMBean(MBeanUtil.java:53)
        at org.apache.hadoop.ipc.metrics.RpcActivityMBean.<init>(RpcActivityMBean.java:70)
        at org.apache.hadoop.ipc.metrics.RpcMetrics.<init>(RpcMetrics.java:64)
        at org.apache.hadoop.ipc.Server.<init>(Server.java:1028)
        at org.apache.hadoop.ipc.RPC$Server.<init>(RPC.java:488)
        at org.apache.hadoop.ipc.RPC.getServer(RPC.java:450)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:191)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:279)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:956)
        at org.apache.hadoop.hdfs.MiniDFSCluster.<init>(MiniDFSCluster.java:275)
        at org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster(HBaseTestingUtility.java:200)
        at org.apache.hadoop.hbase.TestClusterTransitions.beforeAllTests(TestClusterTransitions.java:44)
        at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.executeTest(PowerMockJUnit44RunnerDelegateImpl.java:309)
        at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.executeTestInSuper(PowerMockJUnit47RunnerDelegateImpl.java:112)
        at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.executeTest(PowerMockJUnit47RunnerDelegateImpl.java:73)
        at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.runBeforesThenTestThenAfters(PowerMockJUnit44RunnerDelegateImpl.java:297)
        at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.invokeTestMethod(PowerMockJUnit44RunnerDelegateImpl.java:222)
        at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.runMethods(PowerMockJUnit44RunnerDelegateImpl.java:161)
        at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$1.run(PowerMockJUnit44RunnerDelegateImpl.java:135)
        at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.run(PowerMockJUnit44RunnerDelegateImpl.java:133)
        at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.run(JUnit4TestSuiteChunkerImpl.java:112)
        at org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner.run(AbstractCommonPowerMockRunner.java:55)
{code}

The above classloading uglyness looks like it would take a while to undo -- if its possible
at all -- and when done, I'd end up with a fragile test environment is my guess.  I'm going
to pass on this combo unless others have input.

> Enhance test suite to be able to specify distributed scenarios
> --------------------------------------------------------------
>
>                 Key: HBASE-2414
>                 URL: https://issues.apache.org/jira/browse/HBASE-2414
>             Project: Hadoop HBase
>          Issue Type: Bug
>          Components: test
>    Affects Versions: 0.20.3
>            Reporter: Karthik Ranganathan
>            Assignee: stack
>            Priority: Blocker
>             Fix For: 0.20.5, 0.21.0
>
>         Attachments: directcluster.txt, master2.txt, testmaster-v11.patch, testmaster-v4.patch,
testmaster-v5.patch, testmaster-v7.patch, testmaster-v8.patch
>
>
> We keep finding good cases that are reasonably hard to test, yet the test suite does
not encode these. 
> For example: 
> HBASE-2413 Master does not respect generation stamps, may result in meta getting permanently
offlined
> HBASE-2312 Possible data loss when RS goes into GC pause while rolling HLog
> I am sure there are many more such "scenarios" we should put into the unit tests. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message