AmatyaAvadhanula commented on code in PR #15726:
URL: https://github.com/apache/druid/pull/15726#discussion_r1512572545


##########
server/src/test/java/org/apache/druid/discovery/BaseNodeRoleWatcherTest.java:
##########
@@ -125,15 +190,40 @@ private DiscoveryDruidNode 
buildDiscoveryDruidNode(NodeRole role, String host)
     );
   }
 
-  private void assertListener(TestListener listener, boolean 
nodeViewInitialized, List<DiscoveryDruidNode> nodesAdded, 
List<DiscoveryDruidNode> nodesRemoved)
+  private void assertListenerTimedOut(TestListener listener)

Review Comment:
   This was done to ensure the order of execution in tests.
   Thanks for your suggestion of using the following implementation instead:
   ```
   return new ScheduledThreadPoolExecutor(corePoolSize, 
Execs.makeThreadFactory(nameFormat))
           {
             @Override
             public Future<?> submit(Runnable task) {
               task.run();
               return Futures.immediateFuture(null);
             }
           };
   ```



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to