Barrett Oglesby created GEODE-7466:
--------------------------------------

             Summary: HARegionQueueTest 
queuePutElidesSequenceIdLowerThanOrEqualToLastSeenSequenceId can throw a 
NullPointerException if the CacheClientNotifier instance is set
                 Key: GEODE-7466
                 URL: https://issues.apache.org/jira/browse/GEODE-7466
             Project: Geode
          Issue Type: Bug
          Components: tests
            Reporter: Barrett Oglesby


Testing has shown this NPE can occur:
{noformat}
java.lang.NullPointerException
    at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
    at 
org.apache.geode.internal.cache.tier.sockets.CacheClientNotifier.getClientProxy(CacheClientNotifier.java:1197)
    at 
org.apache.geode.internal.cache.ha.HARegionQueue$DispatchedAndCurrentEvents.putObject(HARegionQueue.java:3023)
    at 
org.apache.geode.internal.cache.ha.HARegionQueue.basicPut(HARegionQueue.java:679)
    at 
org.apache.geode.internal.cache.ha.HARegionQueue.put(HARegionQueue.java:631)
    at 
org.apache.geode.internal.cache.ha.HARegionQueueTest.queuePutElidesSequenceIdLowerThanOrEqualToLastSeenSequenceId(HARegionQueueTest.java:119)
{noformat}
HARegionQueue.java:3023 is here:
{noformat}
                            CacheClientNotifier ccn = 
CacheClientNotifier.getInstance();
                            if (ccn != null) {
HARegionQueue.java:3023 ->    
ccn.getClientProxy(owningQueue.clientProxyID).getStatistics().incMessagesFailedQueued();
                            }
{noformat}
The HARegionQueueTest does not create a CacheClientNotifier, so it seems like 
its created in another test and that test affects this one.

If a CacheClientNotifier is created in this test, then the same NPE is thrown 
because owningQueue.clientProxyID is null.




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to