geode-wan/src/test/java/org/apache/geode/internal/cache/wan/WANTestBase.java
public static void checkPRQLocalSize(String senderId, final int numQueueEntries) {
    GatewaySender sender = null;
    for (GatewaySender s : cache.getGatewaySenders()) {
      if (s.getId().equals(senderId)) {
        sender = s;
        break;
      }
    }

    if (sender.isParallel()) {
      final Set<RegionQueue> queues = ((AbstractGatewaySender) sender).getQueues();
      Awaitility.await().atMost(120, TimeUnit.SECONDS).until(() -> {
        int size = 0;
        for (RegionQueue q : queues) {
          ConcurrentParallelGatewaySenderQueue prQ = (ConcurrentParallelGatewaySenderQueue) q;
          size += prQ.localSize();
        }
        assertEquals(
            " Expected local queue entries: " + numQueueEntries + " but actual entries: " + size,
            numQueueEntries, size);
      });
    }
  }
/**
   * To be used only for ParallelGatewaySender.
   * 
   * @param senderId Id of the ParallelGatewaySender
   * @param numQueueEntries Expected number of ParallelGatewaySenderQueue entries
   */
To be used only for ParallelGatewaySender.

@param senderId Id of the ParallelGatewaySender
@param numQueueEntries Expected number of ParallelGatewaySenderQueue entries
To be used only for ParallelGatewaySender . @param senderId Id of the ParallelGatewaySender @param numQueueEntries Expected number of ParallelGatewaySenderQueue entries
public static void checkPRQLocalSize(String senderId, final int numQueueEntries) {
    GatewaySender sender = null;
    for (GatewaySender s : cache.getGatewaySenders()) {
      if (s.getId().equals(senderId)) {
        sender = s;
        break;
      }
    }
    if (sender.isParallel()) {
      final Set<RegionQueue> queues = ((AbstractGatewaySender) sender).getQueues();
      Awaitility.await().atMost(120, TimeUnit.SECONDS).until(() -> {
        int size = 0;
        for (RegionQueue q : queues) {
          ConcurrentParallelGatewaySenderQueue prQ = (ConcurrentParallelGatewaySenderQueue) q;
          size += prQ.localSize();
        }
        assertEquals(
            " Expected local queue entries: " + numQueueEntries + " but actual entries: " + size,
            numQueueEntries, size);
      });
    }
  }
public static void checkPRQLocalSize ( String senderId , final int numQueueEntries ) { GatewaySender sender = null ; for ( GatewaySender s : cache . getGatewaySenders ( ) ) { if ( s . getId ( ) . equals ( senderId ) ) { sender = s ; break ; } } if ( sender . isParallel ( ) ) { final Set < RegionQueue > queues = ( ( AbstractGatewaySender ) sender ) . getQueues ( ) ; Awaitility . await ( ) . atMost ( 120 , TimeUnit . SECONDS ) . until ( ( ) -> { int size = 0 ; for ( RegionQueue q : queues ) { ConcurrentParallelGatewaySenderQueue prQ = ( ConcurrentParallelGatewaySenderQueue ) q ; size += prQ . localSize ( ) ; } assertEquals ( " Expected local queue entries: " + numQueueEntries + " but actual entries: " + size , numQueueEntries , size ) ; } ) ; } }
To be used only for ParallelGatewaySender.
To be used only for ParallelGatewaySender .