xyuanlu commented on a change in pull request #1362:
URL: https://github.com/apache/helix/pull/1362#discussion_r496215289



##########
File path: 
helix-core/src/test/java/org/apache/helix/messaging/handling/TestHelixTaskExecutor.java
##########
@@ -212,18 +213,33 @@ public TestStateTransitionHandlerFactory(String msgType, 
long delay) {
       _delay = delay;
     }
 
-    class TestStateTransitionMessageHandler extends MessageHandler {
+    class TestStateTransitionMessageHandler extends 
HelixStateTransitionHandler {
+      boolean _testIsMessageStaled;
+
       public TestStateTransitionMessageHandler(Message message, 
NotificationContext context) {
-        super(message, context);
+        super(null, null, message, context, null);
+        _testIsMessageStaled = false;
+      }
+
+      public TestStateTransitionMessageHandler(Message message, 
NotificationContext context,
+          CurrentState currentStateDelta) {
+        super(null, null, message, context, currentStateDelta);
+        _testIsMessageStaled = true;
+
+
       }
 
       @Override
-      public HelixTaskResult handleMessage() throws InterruptedException {
+      public HelixTaskResult handleMessage() {
         HelixTaskResult result = new HelixTaskResult();
         _processedMsgIds.put(_message.getMsgId(), _message.getMsgId());
         if (_delay > 0) {
           System.out.println("Sleeping..." + _delay);
-          Thread.sleep(_delay);
+          try{
+            Thread.sleep(_delay);
+          } catch (Exception e) {
+            assert (false);

Review comment:
       Please correct me if I am wrong. 
   For the `InterruptedException`, we need to either catch it or add a 
declaration in method signature. Since the 
HelixStateTransitionHandler.handleMessage() does not throw exception, we could 
only do a try-catch here. 




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

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