[ 
https://issues.apache.org/jira/browse/GEODE-2789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16444831#comment-16444831
 ] 

Anthony Baker commented on GEODE-2789:
--------------------------------------

[~klund] can this issue be closed?

> Rewrite AutoBalancerJUnitTest to allow refactoring of GemFireCacheImpl
> ----------------------------------------------------------------------
>
>                 Key: GEODE-2789
>                 URL: https://issues.apache.org/jira/browse/GEODE-2789
>             Project: Geode
>          Issue Type: Bug
>          Components: tests
>            Reporter: Kirk Lund
>            Priority: Major
>
> This test is so brittle that any changes to GemFireCacheImpl results in a 
> bunch of JMock failures:
> {noformat}
> java.lang.IllegalArgumentException
>       at net.sf.cglib.asm.ClassReader.<init>(Unknown Source)
>       at net.sf.cglib.asm.ClassReader.<init>(Unknown Source)
>       at net.sf.cglib.asm.ClassReader.<init>(Unknown Source)
>       at 
> net.sf.cglib.proxy.BridgeMethodResolver.resolveAll(BridgeMethodResolver.java:61)
>       at net.sf.cglib.proxy.Enhancer.emitMethods(Enhancer.java:911)
>       at net.sf.cglib.proxy.Enhancer.generateClass(Enhancer.java:498)
>       at 
> net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
>       at 
> net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
>       at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
>       at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
>       at 
> org.jmock.lib.legacy.ClassImposteriser.proxyClass(ClassImposteriser.java:121)
>       at 
> org.jmock.lib.legacy.ClassImposteriser.imposterise(ClassImposteriser.java:66)
>       at org.jmock.Mockery.mock(Mockery.java:148)
>       at org.jmock.Mockery.mock(Mockery.java:124)
>       at 
> org.apache.geode.cache.util.AutoBalancerJUnitTest.testFacadeCollectMemberDetails2Regions(AutoBalancerJUnitTest.java:427)
>       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:497)
>       at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>       at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>       at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>       at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>       at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>       at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
>       at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>       at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>       at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>       at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>       at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>       at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>       at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>       at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>       at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
>       at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
>       at 
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
>       at 
> com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
>       at 
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:237)
>       at 
> com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
> {noformat}
> {noformat}
> java.lang.IllegalArgumentException
>       at net.sf.cglib.asm.ClassReader.<init>(Unknown Source)
>       at net.sf.cglib.asm.ClassReader.<init>(Unknown Source)
>       at net.sf.cglib.asm.ClassReader.<init>(Unknown Source)
>       at 
> net.sf.cglib.proxy.BridgeMethodResolver.resolveAll(BridgeMethodResolver.java:61)
>       at net.sf.cglib.proxy.Enhancer.emitMethods(Enhancer.java:911)
>       at net.sf.cglib.proxy.Enhancer.generateClass(Enhancer.java:498)
>       at 
> net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
>       at 
> net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
>       at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
>       at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
>       at 
> org.jmock.lib.legacy.ClassImposteriser.proxyClass(ClassImposteriser.java:121)
>       at 
> org.jmock.lib.legacy.ClassImposteriser.imposterise(ClassImposteriser.java:66)
>       at org.jmock.Mockery.mock(Mockery.java:148)
>       at org.jmock.Mockery.mock(Mockery.java:124)
>       at 
> org.apache.geode.cache.util.AutoBalancerJUnitTest.getFacadeForResourceManagerOps(AutoBalancerJUnitTest.java:366)
>       at 
> org.apache.geode.cache.util.AutoBalancerJUnitTest.testFacadeTotalTransferSize(AutoBalancerJUnitTest.java:357)
>       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:497)
>       at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>       at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>       at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>       at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>       at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>       at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
>       at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>       at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>       at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>       at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>       at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>       at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>       at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>       at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>       at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
>       at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
>       at 
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
>       at 
> com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
>       at 
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:237)
>       at 
> com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
> {noformat}
> {noformat}
> java.lang.IllegalArgumentException
>       at net.sf.cglib.asm.ClassReader.<init>(Unknown Source)
>       at net.sf.cglib.asm.ClassReader.<init>(Unknown Source)
>       at net.sf.cglib.asm.ClassReader.<init>(Unknown Source)
>       at 
> net.sf.cglib.proxy.BridgeMethodResolver.resolveAll(BridgeMethodResolver.java:61)
>       at net.sf.cglib.proxy.Enhancer.emitMethods(Enhancer.java:911)
>       at net.sf.cglib.proxy.Enhancer.generateClass(Enhancer.java:498)
>       at 
> net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
>       at 
> net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
>       at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
>       at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
>       at 
> org.jmock.lib.legacy.ClassImposteriser.proxyClass(ClassImposteriser.java:121)
>       at 
> org.jmock.lib.legacy.ClassImposteriser.imposterise(ClassImposteriser.java:66)
>       at org.jmock.Mockery.mock(Mockery.java:148)
>       at org.jmock.Mockery.mock(Mockery.java:124)
>       at 
> org.apache.geode.cache.util.AutoBalancerJUnitTest.testFacadeCollectMemberDetailsNoRegion(AutoBalancerJUnitTest.java:410)
>       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:497)
>       at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>       at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>       at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>       at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>       at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>       at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
>       at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>       at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>       at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>       at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>       at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>       at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>       at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>       at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>       at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
>       at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
>       at 
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
>       at 
> com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
>       at 
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:237)
>       at 
> com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70){noformat}
> {noformat}
> java.lang.IllegalArgumentException
>       at net.sf.cglib.asm.ClassReader.<init>(Unknown Source)
>       at net.sf.cglib.asm.ClassReader.<init>(Unknown Source)
>       at net.sf.cglib.asm.ClassReader.<init>(Unknown Source)
>       at 
> net.sf.cglib.proxy.BridgeMethodResolver.resolveAll(BridgeMethodResolver.java:61)
>       at net.sf.cglib.proxy.Enhancer.emitMethods(Enhancer.java:911)
>       at net.sf.cglib.proxy.Enhancer.generateClass(Enhancer.java:498)
>       at 
> net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
>       at 
> net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
>       at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
>       at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
>       at 
> org.jmock.lib.legacy.ClassImposteriser.proxyClass(ClassImposteriser.java:121)
>       at 
> org.jmock.lib.legacy.ClassImposteriser.imposterise(ClassImposteriser.java:66)
>       at org.jmock.Mockery.mock(Mockery.java:148)
>       at 
> org.apache.geode.cache.util.AutoBalancerJUnitTest.testFacadeTotalBytes2Regions(AutoBalancerJUnitTest.java:483)
>       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:497)
>       at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>       at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>       at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>       at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>       at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>       at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
>       at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>       at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>       at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>       at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>       at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>       at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>       at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>       at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>       at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
>       at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
>       at 
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
>       at 
> com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
>       at 
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:237)
>       at 
> com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
> {noformat}
> {noformat}
> java.lang.IllegalArgumentException
>       at net.sf.cglib.asm.ClassReader.<init>(Unknown Source)
>       at net.sf.cglib.asm.ClassReader.<init>(Unknown Source)
>       at net.sf.cglib.asm.ClassReader.<init>(Unknown Source)
>       at 
> net.sf.cglib.proxy.BridgeMethodResolver.resolveAll(BridgeMethodResolver.java:61)
>       at net.sf.cglib.proxy.Enhancer.emitMethods(Enhancer.java:911)
>       at net.sf.cglib.proxy.Enhancer.generateClass(Enhancer.java:498)
>       at 
> net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
>       at 
> net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
>       at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
>       at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
>       at 
> org.jmock.lib.legacy.ClassImposteriser.proxyClass(ClassImposteriser.java:121)
>       at 
> org.jmock.lib.legacy.ClassImposteriser.imposterise(ClassImposteriser.java:66)
>       at org.jmock.Mockery.mock(Mockery.java:148)
>       at org.jmock.Mockery.mock(Mockery.java:124)
>       at 
> org.apache.geode.cache.util.AutoBalancerJUnitTest.getFacadeForResourceManagerOps(AutoBalancerJUnitTest.java:366)
>       at 
> org.apache.geode.cache.util.AutoBalancerJUnitTest.testFacadeRebalance(AutoBalancerJUnitTest.java:362)
>       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:497)
>       at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>       at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>       at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>       at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>       at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>       at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
>       at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>       at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>       at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>       at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>       at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>       at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>       at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>       at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>       at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
>       at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
>       at 
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
>       at 
> com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
>       at 
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:237)
>       at 
> com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to