use of com.thoughtworks.go.remote.work.Work in project gocd by gocd.
the class BuildAssignmentServiceIntegrationTest method shouldUpdateNumberOfActiveRemoteAgentsAfterAssigned.
@Test
public void shouldUpdateNumberOfActiveRemoteAgentsAfterAssigned() {
AgentConfig agentConfig = AgentMother.remoteAgent();
configHelper.addAgent(agentConfig);
fixture.createPipelineWithFirstStageScheduled();
buildAssignmentService.onTimer();
AgentInstance agent = agentService.findAgent(agentConfig.getUuid());
assertFalse(agent.isBuilding());
Work work = buildAssignmentService.assignWorkToAgent(agent(agentConfig));
assertThat(work, instanceOf(BuildWork.class));
assertTrue(agent.isBuilding());
}
Aggregations