Search in sources :

Example 1 with CacheClientProxyStats

use of org.apache.geode.internal.cache.tier.sockets.CacheClientProxyStats in project geode by apache.

the class Bug51400DUnitTest method verifyQueueSize.

public static void verifyQueueSize(Boolean isPrimary, Integer numOfEvents) throws Exception {
    CacheClientProxyStats stats = ((CacheClientProxy) CacheClientNotifier.getInstance().getClientProxies().toArray()[0]).getStatistics();
    if (isPrimary) {
        // marker
        numOfEvents = numOfEvents + 1;
    }
    long qSize = stats.getMessageQueueSize();
    assertEquals("Expected queue size: " + numOfEvents + " but actual size: " + qSize + " at " + (isPrimary ? "primary." : "secondary."), numOfEvents.intValue(), qSize);
}
Also used : CacheClientProxy(org.apache.geode.internal.cache.tier.sockets.CacheClientProxy) CacheClientProxyStats(org.apache.geode.internal.cache.tier.sockets.CacheClientProxyStats)

Aggregations

CacheClientProxy (org.apache.geode.internal.cache.tier.sockets.CacheClientProxy)1 CacheClientProxyStats (org.apache.geode.internal.cache.tier.sockets.CacheClientProxyStats)1