mhansonp commented on code in PR #7608:
URL: https://github.com/apache/geode/pull/7608#discussion_r857851469


##########
geode-cq/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/DurableClientTestBase.java:
##########
@@ -687,41 +675,37 @@ public void run2() throws CacheException {
    */
   void checkCqListenerEvents(VM vm, final String cqName, final int numEvents,
       final int secondsToWait) {
-    vm.invoke(() -> {
-      checkCqListenerEvents(cqName, numEvents, secondsToWait);
-    });
+    vm.invoke(() -> checkCqListenerEvents(cqName, numEvents, secondsToWait));
   }
 
-  void checkCqListenerEvents(final String cqName, final int numEvents,
-      final int secondsToWait) {
-    QueryService qs = CacheServerTestUtil.getCache().getQueryService();
+  void checkCqListenerEvents(final String cqName, final int numEvents, final 
int secondsToWait) {
+    QueryService qs = getCache().getQueryService();
     CqQuery cq = qs.getCq(cqName);
     // Get the listener and wait for the appropriate number of events
-    CacheServerTestUtil.ControlCqListener listener =
-        (CacheServerTestUtil.ControlCqListener) 
cq.getCqAttributes().getCqListener();
-    listener.waitWhileNotEnoughEvents(secondsToWait * 1000, numEvents);
+    ControlCqListener listener =
+        (ControlCqListener) cq.getCqAttributes().getCqListener();
+    listener.waitWhileNotEnoughEvents(secondsToWait * 1000L, numEvents);

Review Comment:
   Done



##########
geode-cq/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/DurableClientTestBase.java:
##########
@@ -687,41 +675,37 @@ public void run2() throws CacheException {
    */
   void checkCqListenerEvents(VM vm, final String cqName, final int numEvents,
       final int secondsToWait) {
-    vm.invoke(() -> {
-      checkCqListenerEvents(cqName, numEvents, secondsToWait);
-    });
+    vm.invoke(() -> checkCqListenerEvents(cqName, numEvents, secondsToWait));
   }
 
-  void checkCqListenerEvents(final String cqName, final int numEvents,
-      final int secondsToWait) {
-    QueryService qs = CacheServerTestUtil.getCache().getQueryService();
+  void checkCqListenerEvents(final String cqName, final int numEvents, final 
int secondsToWait) {
+    QueryService qs = getCache().getQueryService();
     CqQuery cq = qs.getCq(cqName);
     // Get the listener and wait for the appropriate number of events
-    CacheServerTestUtil.ControlCqListener listener =
-        (CacheServerTestUtil.ControlCqListener) 
cq.getCqAttributes().getCqListener();
-    listener.waitWhileNotEnoughEvents(secondsToWait * 1000, numEvents);
+    ControlCqListener listener =
+        (ControlCqListener) cq.getCqAttributes().getCqListener();
+    listener.waitWhileNotEnoughEvents(secondsToWait * 1000L, numEvents);
     assertThat(numEvents).isEqualTo(listener.events.size());
   }
 
   void checkListenerEvents(int numberOfEntries, final int sleepMinutes, final 
int eventType,
       final VM vm) {
     vm.invoke(() -> {
       // Get the region
-      Region<Object, Object> region = 
CacheServerTestUtil.getCache().getRegion(regionName);
+      Region<Object, Object> region = getCache().getRegion(regionName);
       assertThat(region).isNotNull();
 
       // Get the listener and wait for the appropriate number of events
-      CacheServerTestUtil.ControlListener controlListener =
-          (CacheServerTestUtil.ControlListener) 
region.getAttributes().getCacheListeners()[0];
-
-      controlListener.waitWhileNotEnoughEvents(sleepMinutes * 60 * 1000, 
numberOfEntries,
+      ControlListener controlListener =
+          (ControlListener) region.getAttributes().getCacheListeners()[0];
+      controlListener.waitWhileNotEnoughEvents((long) sleepMinutes * 60 * 
1000, numberOfEntries,

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to