Package org.apache.helix.messaging.handling

Examples of org.apache.helix.messaging.handling.HelixTaskExecutor.onMessage()


      msgList.add(msg);
      msg.setTgtName("Localhost_1123");
      msg.setSrcName("127.101.1.23_2234");
      msgListToCancel.add(msg);
    }
    executor.onMessage("someInstance", msgList, changeContext);
    Thread.sleep(500);
    for(int i = 0; i < nMsgs2; i++)
    {
      // executor.cancelTask(msgListToCancel.get(i), changeContext);
      HelixTask task = new HelixTask(msgListToCancel.get(i), changeContext, null, null);
View Full Code Here


        msg.setTgtName("Localhost_1123");
        msg.setSrcName("127.101.1.23_2234");
        msgList.add(msg);
      }
      NotificationContext changeContext = new NotificationContext(manager);
      executor.onMessage("some", msgList, changeContext);
      Thread.sleep(500);
      for(ExecutorService svc : executor._executorMap.values())
      {
        Assert.assertFalse(svc.isShutdown());
      }
View Full Code Here

      msg.setTgtName("Localhost_1123");
      msg.setSrcName("127.101.1.23_2234");
      msg.setExecutionTimeout((i+1) * 600);
      msgList.add(msg);
    }
    executor.onMessage("someInstance", msgList, changeContext);
   
    Thread.sleep(4000);

    AssertJUnit.assertTrue(factory._handlersCreated ==  nMsgs2);
    AssertJUnit.assertEquals(factory._timedOutMsgIds.size() , 2);
View Full Code Here

      msg.setSrcName("127.101.1.23_2234");
      msg.setExecutionTimeout((i+1) * 600);
      msg.setRetryCount(1);
      msgList.add(msg);
    }
    executor.onMessage("someInstance", msgList, changeContext);
    Thread.sleep(3500);
    AssertJUnit.assertEquals(factory._processedMsgIds.size(),3);
    AssertJUnit.assertTrue(msgList.get(0).getRecord().getSimpleField("Cancelcount").equals("2"));
    AssertJUnit.assertTrue(msgList.get(1).getRecord().getSimpleField("Cancelcount").equals("1"));
    AssertJUnit.assertEquals(factory._timedOutMsgIds.size(),2);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.