}
@Test
public void testMuleReceiverJob() throws Exception
{
((DefaultMuleContext) muleContext).setPollingController(new PollingController()
{
@Override
public boolean isPrimaryPollingInstance()
{
return false;
}
});
FunctionalTestComponent component = (FunctionalTestComponent) getComponent("quartzService1");
assertNotNull(component);
CountdownCallback count1 = new CountdownCallback(1000);
component.setEventCallback(count1);
component = (FunctionalTestComponent) getComponent("quartzService2");
assertNotNull(component);
CountdownCallback count2 = new CountdownCallback(1000);
component.setEventCallback(count2);
Thread.sleep(10000);
assertEquals(1000, count1.getCount());
assertEquals(1000, count2.getCount());
((DefaultMuleContext)muleContext).setPollingController(new PollingController()
{
@Override
public boolean isPrimaryPollingInstance()
{
return true;