Search in sources :

Example 1 with WorkAssignmentPerformanceLogger

use of com.thoughtworks.go.server.perf.WorkAssignmentPerformanceLogger in project gocd by gocd.

the class WorkFinderTest method before.

@Before
public void before() {
    context = new ClassMockery();
    workAssigner = context.mock(BuildAssignmentService.class);
    assignedWorkTopic = context.mock(WorkAssignedTopic.class, "assignedWork");
    idleAgentTopic = context.mock(IdleAgentTopic.class, "idleAgent");
    workAssignmentPerformanceLogger = mock(WorkAssignmentPerformanceLogger.class);
    context.checking(new Expectations() {

        {
            one(idleAgentTopic).addListener(with(any(WorkFinder.class)));
        }
    });
    finder = new WorkFinder(workAssigner, idleAgentTopic, assignedWorkTopic, workAssignmentPerformanceLogger);
}
Also used : Expectations(org.jmock.Expectations) WorkAssignmentPerformanceLogger(com.thoughtworks.go.server.perf.WorkAssignmentPerformanceLogger) ClassMockery(com.thoughtworks.go.util.ClassMockery) BuildAssignmentService(com.thoughtworks.go.server.service.BuildAssignmentService) Before(org.junit.Before)

Example 2 with WorkAssignmentPerformanceLogger

use of com.thoughtworks.go.server.perf.WorkAssignmentPerformanceLogger in project gocd by gocd.

the class BuildRepositoryMessageProducerTest method setUp.

@Before
public void setUp() {
    oldImplementation = mock(BuildRepositoryRemoteImpl.class);
    newImplementation = mock(WorkAssignments.class);
    WorkAssignmentPerformanceLogger workAssignmentPerformanceLogger = mock(WorkAssignmentPerformanceLogger.class);
    producer = new BuildRepositoryMessageProducer(oldImplementation, newImplementation, workAssignmentPerformanceLogger);
}
Also used : BuildRepositoryRemoteImpl(com.thoughtworks.go.remote.BuildRepositoryRemoteImpl) WorkAssignmentPerformanceLogger(com.thoughtworks.go.server.perf.WorkAssignmentPerformanceLogger) WorkAssignments(com.thoughtworks.go.server.messaging.scheduling.WorkAssignments) Before(org.junit.Before)

Aggregations

WorkAssignmentPerformanceLogger (com.thoughtworks.go.server.perf.WorkAssignmentPerformanceLogger)2 Before (org.junit.Before)2 BuildRepositoryRemoteImpl (com.thoughtworks.go.remote.BuildRepositoryRemoteImpl)1 WorkAssignments (com.thoughtworks.go.server.messaging.scheduling.WorkAssignments)1 BuildAssignmentService (com.thoughtworks.go.server.service.BuildAssignmentService)1 ClassMockery (com.thoughtworks.go.util.ClassMockery)1 Expectations (org.jmock.Expectations)1