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

ASF subversion and git services commented on GEODE-96:
------------------------------------------------------

Commit 6aadbf81c8d8549cd82ae73994997f3a9e83c060 in incubator-geode's branch 
refs/heads/feature/GEODE-409 from [~dschneider]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-geode.git;h=6aadbf8 ]

GEODE-96: fix race in unit test

It looks like the problem might have been that the
test only waited 5 seconds for an event.
It now waits 30 seconds. It also now can sense more
of what is happening on the OffHeapMemmoryMonitor
using the new testHook OffHeapMemoryMonitorObserver.
If this problem reproduces then the test can add
additional validation to its observer to narrow down
what the cause of the missing event is.
This also fixes GEODE-348.


> MemoryThresholdsOffHeapDUnitTest.testDistributedRegionClientPutRejection 
> fails intermittently
> ---------------------------------------------------------------------------------------------
>
>                 Key: GEODE-96
>                 URL: https://issues.apache.org/jira/browse/GEODE-96
>             Project: Geode
>          Issue Type: Bug
>          Components: client/server, core
>            Reporter: Dan Smith
>            Assignee: Darrel Schneider
>            Priority: Minor
>              Labels: CI
>
> This test failed in one of the nightly builds, but it passed in others and 
> passed when I ran it by itself. This test may have a race condition.
> https://builds.apache.org/view/All/job/Geode-nightly/123/testReport/junit/com.gemstone.gemfire.cache.management/MemoryThresholdsOffHeapDUnitTest/testDistributedRegionClientPutRejection/
> {noformat}
> dunit.RMIException: While invoking 
> com.gemstone.gemfire.cache.management.MemoryThresholdsOffHeapDUnitTest$39.call
>  in VM 1 running on Host hemera.apache.org with 4 VMs
>       at dunit.VM.invoke(VM.java:359)
>       at dunit.VM.invoke(VM.java:303)
>       at dunit.VM.invoke(VM.java:271)
>       at 
> com.gemstone.gemfire.cache.management.MemoryThresholdsOffHeapDUnitTest.doPuts(MemoryThresholdsOffHeapDUnitTest.java:1311)
>       at 
> com.gemstone.gemfire.cache.management.MemoryThresholdsOffHeapDUnitTest.doClientServerTest(MemoryThresholdsOffHeapDUnitTest.java:1423)
>       at 
> com.gemstone.gemfire.cache.management.MemoryThresholdsOffHeapDUnitTest.testDistributedRegionClientPutRejection(MemoryThresholdsOffHeapDUnitTest.java:1305)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:606)
>       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.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass(JUnitTestClassExecuter.java:86)
>       at 
> org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:49)
>       at 
> org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:64)
>       at 
> org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:50)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:606)
>       at 
> org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
>       at 
> org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
>       at 
> org.gradle.messaging.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
>       at 
> org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
>       at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)
>       at 
> org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:106)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:606)
>       at 
> org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
>       at 
> org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
>       at 
> org.gradle.messaging.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:360)
>       at 
> org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>       at java.lang.Thread.run(Thread.java:745)
> Caused by: junit.framework.AssertionFailedError: An expected 
> ResourceException was not thrown
>       at junit.framework.Assert.fail(Assert.java:57)
>       at junit.framework.TestCase.fail(TestCase.java:227)
>       at 
> com.gemstone.gemfire.cache.management.MemoryThresholdsOffHeapDUnitTest$39.call(MemoryThresholdsOffHeapDUnitTest.java:1317)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:606)
>       at hydra.MethExecutor.executeObject(MethExecutor.java:258)
>       at 
> dunit.standalone.RemoteDUnitVM.executeMethodOnObject(RemoteDUnitVM.java:67)
>       at sun.reflect.GeneratedMethodAccessor63.invoke(Unknown Source)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:606)
>       at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
>       at sun.rmi.transport.Transport$1.run(Transport.java:177)
>       at sun.rmi.transport.Transport$1.run(Transport.java:174)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
>       at 
> sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:556)
>       at 
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811)
>       at 
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670)
> {noformat}



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

Reply via email to