gortiz commented on code in PR #11205:
URL: https://github.com/apache/pinot/pull/11205#discussion_r1289961773


##########
pinot-query-runtime/src/test/java/org/apache/pinot/query/runtime/executor/OpChainSchedulerServiceTest.java:
##########
@@ -203,84 +143,72 @@ public void 
shouldCallCancelOnOperatorsThatReturnErrorBlock()
       return null;
     }).when(_operatorA).cancel(Mockito.any());
 
-    schedulerService.startAsync().awaitRunning();
     schedulerService.register(opChain);
 
     Assert.assertTrue(latch.await(10, TimeUnit.SECONDS), "expected await to be 
called in less than 10 seconds");
-    schedulerService.stopAsync().awaitTerminated();
   }
 
-  @Test
-  public void shouldCallCancelOnOpChainsWhenItIsCancelledByDispatch()
-      throws InterruptedException {
-    initExecutor(1);
-    OpChain opChain = getChain(_operatorA);
-    Mockito.when(_scheduler.next(Mockito.anyLong(), 
Mockito.any())).thenAnswer((Answer<OpChain>) invocation -> {
-      Thread.sleep(100);
-      return opChain;
-    });
-    OpChainSchedulerService schedulerService = new 
OpChainSchedulerService(_scheduler, _executor);
-
-    
Mockito.when(_operatorA.nextBlock()).thenReturn(TransferableBlockUtils.getNoOpTransferableBlock());
-
-    CountDownLatch cancelLatch = new CountDownLatch(1);
-    Mockito.doAnswer(inv -> {
-      cancelLatch.countDown();
-      return null;
-    }).when(_operatorA).cancel(Mockito.any());
-    CountDownLatch deregisterLatch = new CountDownLatch(1);
-    Mockito.doAnswer(inv -> {
-      deregisterLatch.countDown();
-      return null;
-    }).when(_scheduler).deregister(Mockito.same(opChain));
-    CountDownLatch awaitLatch = new CountDownLatch(1);
-    Mockito.doAnswer(inv -> {
-      awaitLatch.countDown();
-      return null;
-    }).when(_scheduler).yield(Mockito.any());
-
-    schedulerService.startAsync().awaitRunning();
-    schedulerService.register(opChain);
-
-    Assert.assertTrue(awaitLatch.await(10, TimeUnit.SECONDS), "expected await 
to be called in less than 10 seconds");
-
-    // now cancel the request.
-    schedulerService.cancel(123);
-
-    Assert.assertTrue(cancelLatch.await(10, TimeUnit.SECONDS), "expected 
OpChain to be cancelled");
-    Assert.assertTrue(deregisterLatch.await(10, TimeUnit.SECONDS), "expected 
OpChain to be deregistered");
-    Mockito.verify(_operatorA, Mockito.times(1)).cancel(Mockito.any());
-    Mockito.verify(_scheduler, Mockito.times(1)).deregister(Mockito.any());
-    schedulerService.stopAsync().awaitTerminated();
-  }
+//  @Test
+//  public void shouldCallCancelOnOpChainsWhenItIsCancelledByDispatch()

Review Comment:
   What do you think we should do there?



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to