Search in sources :

Example 26 with ServerHealthService

use of com.thoughtworks.go.serverhealth.ServerHealthService in project gocd by gocd.

the class ScheduleServiceTest method createMocks.

private void createMocks() {
    jobInstanceService = mock(JobInstanceService.class);
    goConfigService = mock(GoConfigService.class);
    environmentConfigService = mock(EnvironmentConfigService.class);
    serverHealthService = mock(ServerHealthService.class);
    final TestTransactionSynchronizationManager synchronizationManager = new TestTransactionSynchronizationManager();
    schedulingChecker = mock(SchedulingCheckerService.class);
    pipelineScheduleQueue = mock(PipelineScheduleQueue.class);
    consoleActivityMonitor = mock(ConsoleActivityMonitor.class);
    pipelinePauseService = mock(PipelinePauseService.class);
    stageService = mock(StageService.class);
    securityService = mock(SecurityService.class);
    pipelineService = mock(PipelineService.class);
    localizer = mock(Localizer.class);
    timeProvider = new TimeProvider();
    schedulingPerformanceLogger = mock(SchedulingPerformanceLogger.class);
    elasticProfileService = mock(ElasticProfileService.class);
    stageOrderService = mock(StageOrderService.class);
    pipelineLockService = mock(PipelineLockService.class);
    service = new ScheduleService(goConfigService, pipelineService, stageService, schedulingChecker, mock(PipelineDao.class), mock(StageDao.class), stageOrderService, securityService, pipelineScheduleQueue, jobInstanceService, mock(JobInstanceDao.class), mock(AgentAssignment.class), environmentConfigService, pipelineLockService, serverHealthService, new TestTransactionTemplate(synchronizationManager), mock(AgentService.class), synchronizationManager, timeProvider, consoleActivityMonitor, pipelinePauseService, instanceFactory, schedulingPerformanceLogger, elasticProfileService);
}
Also used : TestTransactionTemplate(com.thoughtworks.go.server.transaction.TestTransactionTemplate) TimeProvider(com.thoughtworks.go.util.TimeProvider) TestTransactionSynchronizationManager(com.thoughtworks.go.server.transaction.TestTransactionSynchronizationManager) Localizer(com.thoughtworks.go.i18n.Localizer) SchedulingPerformanceLogger(com.thoughtworks.go.server.perf.SchedulingPerformanceLogger) ServerHealthService(com.thoughtworks.go.serverhealth.ServerHealthService)

Aggregations

ServerHealthService (com.thoughtworks.go.serverhealth.ServerHealthService)26 Before (org.junit.Before)13 Test (org.junit.Test)7 SchedulingPerformanceLogger (com.thoughtworks.go.server.perf.SchedulingPerformanceLogger)4 GoConfigService (com.thoughtworks.go.server.service.GoConfigService)4 ConfigRepository (com.thoughtworks.go.service.ConfigRepository)4 IOException (java.io.IOException)4 GitMaterialConfig (com.thoughtworks.go.config.materials.git.GitMaterialConfig)3 ConfigRepoConfig (com.thoughtworks.go.config.remote.ConfigRepoConfig)3 TestTransactionSynchronizationManager (com.thoughtworks.go.server.transaction.TestTransactionSynchronizationManager)3 TestTransactionTemplate (com.thoughtworks.go.server.transaction.TestTransactionTemplate)3 ServerVersion (com.thoughtworks.go.server.util.ServerVersion)3 SystemEnvironment (com.thoughtworks.go.util.SystemEnvironment)3 TimeProvider (com.thoughtworks.go.util.TimeProvider)3 ConfigFileHasChangedException (com.thoughtworks.go.config.exceptions.ConfigFileHasChangedException)2 ConfigMergeException (com.thoughtworks.go.config.exceptions.ConfigMergeException)2 GoConfigInvalidException (com.thoughtworks.go.config.exceptions.GoConfigInvalidException)2 ConfigElementImplementationRegistry (com.thoughtworks.go.config.registry.ConfigElementImplementationRegistry)2 MaterialRevisions (com.thoughtworks.go.domain.MaterialRevisions)2 Pipeline (com.thoughtworks.go.domain.Pipeline)2