You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Jason Huynh (JIRA)" <ji...@apache.org> on 2016/03/24 22:18:25 UTC

[jira] [Commented] (GEODE-1125) Number of region entries does not match with the expected number at the end of tests

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

Jason Huynh commented on GEODE-1125:
------------------------------------

The problem appears that the tests are passing a majority of the time.  However they are passing for the wrong reasons.  The order of operations (summarized):
1.) Sender is started with region and 10 puts are executed (keys 0-9)
2.) Receiver is started with region and 10 entries are received
3.) Sender region is destroyed (locally) and recreated.
4.) Puts with keys (10-19) are executed
5.) Verify Receiver region has 10 keys. -  This is where the test should have actually expected 20.  However because of timing, the receiver currently has 10 keys (0-9) and the test was probably expecting the other 10 keys (10-19) instead.

There are at least 2 tests that have this same behavior and need to be changed.  The code itself could be rewritten as the "helper" methods have a lot of side effects, mixing parameter usage with member variable usage (such as passing in vm4 but then modifying vm2 from the member variable)

Another thing to change is the number of keys could differ (say start with 10 keys and the second time add 15 keys).  Verification could also make sure the expected keys are present instead of relying on counts.


> Number of region entries does not match with the expected number at the end of tests
> ------------------------------------------------------------------------------------
>
>                 Key: GEODE-1125
>                 URL: https://issues.apache.org/jira/browse/GEODE-1125
>             Project: Geode
>          Issue Type: Bug
>          Components: offheap, wan
>            Reporter: nabarun
>
> {panel:title=Error Log} 
> com.gemstone.gemfire.test.dunit.RMIException: While invoking com.gemstone.gemfire.internal.cache.wan.WANTestBase$$Lambda$31/1631119258.run in VM 2 running on Host 10.118.33.165 with 8 VMs
> 	at com.gemstone.gemfire.test.dunit.VM.invoke(VM.java:440)
> 	at com.gemstone.gemfire.test.dunit.VM.invoke(VM.java:382)
> 	at com.gemstone.gemfire.test.dunit.VM.invoke(VM.java:318)
> 	at com.gemstone.gemfire.internal.cache.wan.WANTestBase.validateRegionSizes(WANTestBase.java:4868)
> 	at com.gemstone.gemfire.internal.cache.wan.concurrent.ConcurrentParallelGatewaySenderOperation_2_DUnitTest.recreatePRDoPutsAndValidateRegionSizes(ConcurrentParallelGatewaySenderOperation_2_DUnitTest.java:501)
> 	at com.gemstone.gemfire.internal.cache.wan.concurrent.ConcurrentParallelGatewaySenderOperation_2_DUnitTest.testParallelGatewaySender_SingleNode_UserPR_Destroy_RecreateRegion(ConcurrentParallelGatewaySenderOperation_2_DUnitTest.java:88)
> 	at sun.reflect.GeneratedMethodAccessor397.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:497)
> 	at junit.framework.TestCase.runTest(TestCase.java:176)
> 	at junit.framework.TestCase.runBare(TestCase.java:141)
> 	at junit.framework.TestResult$1.protect(TestResult.java:122)
> 	at junit.framework.TestResult.runProtected(TestResult.java:142)
> 	at junit.framework.TestResult.run(TestResult.java:125)
> 	at junit.framework.TestCase.run(TestCase.java:129)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:252)
> 	at junit.framework.TestSuite.run(TestSuite.java:247)
> 	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86)
> 	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> 	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:119)
> 	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:65)
> 	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
> 	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
> 	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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
> Caused by: java.lang.AssertionError: Event never occurred after 240000 ms: Expected region entries: 10 but actual entries: 20 present region keyset [0, 10, 1, 11, 2, 12, 3, 13, 4, 14, 5, 15, 16, 6, 17, 7, 18, 8, 19, 9]
> 	at org.junit.Assert.fail(Assert.java:88)
> 	at com.gemstone.gemfire.test.dunit.Wait.waitForCriterion(Wait.java:119)
> 	at com.gemstone.gemfire.internal.cache.wan.WANTestBase.validateRegionSize(WANTestBase.java:3719)
> 	at com.gemstone.gemfire.internal.cache.wan.WANTestBase.lambda$validateRegionSizes$985416d8$1(WANTestBase.java:4868)
> 	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 hydra.MethExecutor.executeObject(MethExecutor.java:268)
> 	at com.gemstone.gemfire.test.dunit.standalone.RemoteDUnitVM.executeMethodOnObject(RemoteDUnitVM.java:84)
> 	at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:497)
> 	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:323)
> 	at sun.rmi.transport.Transport$1.run(Transport.java:200)
> 	at sun.rmi.transport.Transport$1.run(Transport.java:197)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
> 	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
> 	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
> 	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$256(TCPTransport.java:683)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> 	at java.lang.Thread.run(Thread.java:745)
> {panel}
> {panel:title=To recreate}
> Execute the test case repeatedly [with the run config in the IDE as "until failure"]. In IntelliJ the failure happens around 87th execution.
> {panel}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)