Examples of ActionId


Examples of org.apache.ambari.server.state.action.ActionId

import org.junit.Test;

public class JobTest {

  private Action createNewJob(long id, String jobName, long startTime) {
    ActionId jId = new ActionId(id, new ActionType(jobName));
    Action job = new ActionImpl(jId, startTime);
    return job;
  }
View Full Code Here

Examples of org.apache.ambari.server.state.action.ActionId

  }

  @Test
  public void reInitCompletedJob() throws Exception {
    Action job = getCompletedJob(1, "JobNameFoo", 1, false);
    ActionId jId = new ActionId(2, new ActionType("JobNameFoo"));
    ActionInitEvent e = new ActionInitEvent(jId, 100);
    job.handleEvent(e);
    Assert.assertEquals(ActionState.INIT, job.getState());
    Assert.assertEquals(100, job.getStartTime());
    Assert.assertEquals(-1, job.getLastUpdateTime());
View Full Code Here

Examples of org.asmatron.messengine.action.ActionId

    RequestMethodTester annotationTester = new RequestMethodTester();
    controlConfigurator.setupControlEngine(annotationTester);

    verify(engine).addActionHandler(actionTypeCaptor.capture(),
        actionHandlerCaptor.capture());
    ActionId type = actionTypeCaptor.getValue();
    ActionHandler handler = actionHandlerCaptor.getValue();
    assertEquals(TestTypes.requestId, type.getId());
    assertEquals(TestTypes.request, type);

    assertNotNull(handler);
    assertFalse(annotationTester.requestHandled);
    handler.handle(new RequestAction<String, Integer>("5", EmptyCallback
View Full Code Here

Examples of org.asmatron.messengine.action.ActionId

    ActionMethodTester annotationTester = new ActionMethodTester();
    controlConfigurator.setupControlEngine(annotationTester);

    verify(engine).addActionHandler(actionTypeCaptor.capture(),
        actionHandlerCaptor.capture());
    ActionId type = actionTypeCaptor.getValue();
    ActionHandler handler = actionHandlerCaptor.getValue();

    assertEquals(TestTypes.actionId, type.getId());
    assertEquals(TestTypes.action, type);

    assertNotNull(handler);
    assertNull(annotationTester.val);
    handler.handle(new ValueAction("a"));
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.