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

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

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

GEODE-1456: fix race in GemFireCacheImplTest

The race was caused by the GemFireCacheImpl constructor creating a real 
TypeRegistry.
The TypeRegistry creates a region which scheduled an async create region event 
with the
event pool. So when the test set "initialCount" this create region event might 
not have
completed so the initialCount would be zero. The test then scheduled 
MAX_THREADS tasks
and waits until that many complete. But the create region event could also 
complete causing
getCompletedTaskCount() to return a value 1 more than the test expected which 
caused it
to intermittently timeout.

The test now mocks the TypeRegistry so the only events scheduled with the pool 
come from
the unit test.


> CI Failure: 
> GemFireCacheImplTest.checkThatAsyncEventListenersUseAllThreadsInPool
> --------------------------------------------------------------------------------
>
>                 Key: GEODE-1456
>                 URL: https://issues.apache.org/jira/browse/GEODE-1456
>             Project: Geode
>          Issue Type: Bug
>          Components: regions
>            Reporter: Darrel Schneider
>            Assignee: Darrel Schneider
>              Labels: CI
>             Fix For: 1.0.0-incubating.M3
>
>
> com.gemstone.gemfire.internal.cache.GemFireCacheImplTest > 
> checkThatAsyncEventListenersUseAllThreadsInPool FAILED
>     com.jayway.awaitility.core.ConditionTimeoutException: Condition with 
> lambda expression in com.gemstone.gemfire.internal.cache.GemFireCacheImplTest 
> that uses java.util.concurrent.ThreadPoolExecutor, 
> java.util.concurrent.ThreadPoolExecutorint, intlong was not fulfilled within 
> 15 seconds.
>         at 
> com.jayway.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:122)
>         at 
> com.jayway.awaitility.core.CallableCondition.await(CallableCondition.java:79)
>         at 
> com.jayway.awaitility.core.CallableCondition.await(CallableCondition.java:27)
>         at 
> com.jayway.awaitility.core.ConditionFactory.until(ConditionFactory.java:764)
>         at 
> com.jayway.awaitility.core.ConditionFactory.until(ConditionFactory.java:741)
>         at 
> com.gemstone.gemfire.internal.cache.GemFireCacheImplTest.checkThatAsyncEventListenersUseAllThreadsInPool(GemFireCacheImplTest.java:60)



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

Reply via email to