Search in sources :

Example 1 with AgentStatusChangeListener

use of com.thoughtworks.go.listener.AgentStatusChangeListener in project gocd by gocd.

the class ScheduleServiceRescheduleHungJobsTest method activities.

private AgentInstances activities() {
    AgentStatusChangeListener agentStatusChangeListener = mock(AgentStatusChangeListener.class);
    final AgentInstances activities = new AgentInstances(agentStatusChangeListener);
    SystemEnvironment systemEnvironment = new SystemEnvironment();
    activities.add(AgentInstance.createFromConfig(new AgentConfig("uuid1"), systemEnvironment, agentStatusChangeListener));
    activities.add(AgentInstance.createFromConfig(new AgentConfig("uuid2"), systemEnvironment, agentStatusChangeListener));
    return activities;
}
Also used : SystemEnvironment(com.thoughtworks.go.util.SystemEnvironment) AgentInstances(com.thoughtworks.go.server.domain.AgentInstances) AgentConfig(com.thoughtworks.go.config.AgentConfig) AgentStatusChangeListener(com.thoughtworks.go.listener.AgentStatusChangeListener)

Example 2 with AgentStatusChangeListener

use of com.thoughtworks.go.listener.AgentStatusChangeListener in project gocd by gocd.

the class AgentInstanceTest method setUp.

@Before
public void setUp() {
    systemEnvironment = new SystemEnvironment();
    agentConfig = new AgentConfig("uuid2", "CCeDev01", DEFAULT_IP_ADDRESS);
    defaultBuildingInfo = new AgentBuildingInfo("pipeline", "buildLocator");
    agentStatusChangeListener = mock(AgentStatusChangeListener.class);
}
Also used : SystemEnvironment(com.thoughtworks.go.util.SystemEnvironment) AgentConfig(com.thoughtworks.go.config.AgentConfig) AgentBuildingInfo(com.thoughtworks.go.server.service.AgentBuildingInfo) AgentStatusChangeListener(com.thoughtworks.go.listener.AgentStatusChangeListener) Before(org.junit.Before)

Aggregations

AgentConfig (com.thoughtworks.go.config.AgentConfig)2 AgentStatusChangeListener (com.thoughtworks.go.listener.AgentStatusChangeListener)2 SystemEnvironment (com.thoughtworks.go.util.SystemEnvironment)2 AgentInstances (com.thoughtworks.go.server.domain.AgentInstances)1 AgentBuildingInfo (com.thoughtworks.go.server.service.AgentBuildingInfo)1 Before (org.junit.Before)1