use of org.apache.geode.cache.asyncqueue.AsyncEventQueue in project geode by apache.
the class WANTestBase method validateAsyncEventListener.
public static void validateAsyncEventListener(String asyncQueueId, final int expectedSize) {
AsyncEventListener theListener = null;
Set<AsyncEventQueue> asyncEventQueues = cache.getAsyncEventQueues();
for (AsyncEventQueue asyncQueue : asyncEventQueues) {
if (asyncQueueId.equals(asyncQueue.getId())) {
theListener = asyncQueue.getAsyncEventListener();
}
}
final Map eventsMap = ((MyAsyncEventListener) theListener).getEventsMap();
assertNotNull(eventsMap);
Awaitility.await().atMost(60, TimeUnit.SECONDS).until(() -> assertEquals("Expected map entries: " + expectedSize + " but actual entries: " + eventsMap.size(), expectedSize, eventsMap.size()));
}
use of org.apache.geode.cache.asyncqueue.AsyncEventQueue in project geode by apache.
the class WANTestBase method getAsyncEventListenerMapSize.
public static int getAsyncEventListenerMapSize(String asyncEventQueueId) {
AsyncEventListener theListener = null;
Set<AsyncEventQueue> asyncEventQueues = cache.getAsyncEventQueues();
for (AsyncEventQueue asyncQueue : asyncEventQueues) {
if (asyncEventQueueId.equals(asyncQueue.getId())) {
theListener = asyncQueue.getAsyncEventListener();
}
}
final Map eventsMap = ((MyAsyncEventListener) theListener).getEventsMap();
assertNotNull(eventsMap);
LogWriterUtils.getLogWriter().info("The events map size is " + eventsMap.size());
return eventsMap.size();
}
Aggregations