@Test public void monitoringStatus_contains_information_about_multiple_job_states_but_only_for_configured_server() { addJob(SERVER_ID, PDSJobStatusState.CREATED, 1); addJob(SERVER_ID, PDSJobStatusState.QUEUED, 2); addJob(SERVER_ID, PDSJobStatusState.RUNNING, 3); addJob(SERVER_ID, PDSJobStatusState.DONE, 4); addJob(SERVER_ID, PDSJobStatusState.FAILED, 5); addJob(SERVER_ID_FROM_OTHER_SERVER, PDSJobStatusState.QUEUED, 10); addJob(SERVER_ID_FROM_OTHER_SERVER, PDSJobStatusState.CREATED, 20); addJob(SERVER_ID_FROM_OTHER_SERVER, PDSJobStatusState.RUNNING, 30); addJob(SERVER_ID_FROM_OTHER_SERVER, PDSJobStatusState.DONE, 40); addJob(SERVER_ID_FROM_OTHER_SERVER, PDSJobStatusState.FAILED, 50); PDSMonitoring monitoring = serviceToTest.getMonitoringStatus(); assertFound(monitoring, PDSJobStatusState.CREATED,1); assertFound(monitoring, PDSJobStatusState.QUEUED,2); assertFound(monitoring, PDSJobStatusState.RUNNING,3); assertFound(monitoring, PDSJobStatusState.DONE,4); assertFound(monitoring, PDSJobStatusState.FAILED,5); }
@UseCaseAdminFetchesMonitoringStatus(@PDSStep(name="service call",description = "service fetches job state counts and gathers hearbeats of cluster members by serverId",number=4)) public PDSMonitoring getMonitoringStatus() { String serverId = serverConfiguratonService.getServerId(); PDSMonitoring monitoring = new PDSMonitoring(); addStateCounts(serverId, monitoring); addHeartBeatDataAsMember(serverId, monitoring); return monitoring; }
PDSMonitoringStatusService { @UseCaseAdminFetchesMonitoringStatus(@PDSStep(name="service call",description = "service fetches job state counts and gathers hearbeats of cluster members by serverId",number=4)) public PDSMonitoring getMonitoringStatus() { String serverId = serverConfiguratonService.getServerId(); PDSMonitoring monitoring = new PDSMonitoring(); addStateCounts(serverId, monitoring); addHeartBeatDataAsMember(serverId, monitoring); return monitoring; } }
PDSMonitoringStatusService { @UseCaseAdminFetchesMonitoringStatus(@PDSStep(name="service call",description = "service fetches job state counts and gathers hearbeats of cluster members by serverId",number=4)) public PDSMonitoring getMonitoringStatus() { String serverId = serverConfiguratonService.getServerId(); PDSMonitoring monitoring = new PDSMonitoring(); addStateCounts(serverId, monitoring); addHeartBeatDataAsMember(serverId, monitoring); return monitoring; }  }
PDSMonitoringStatusService { @UseCaseAdminFetchesMonitoringStatus(@PDSStep(name="service call",description = "service fetches job state counts and gathers hearbeats of cluster members by serverId",number=4)) public PDSMonitoring getMonitoringStatus() { String serverId = serverConfiguratonService.getServerId(); PDSMonitoring monitoring = new PDSMonitoring(); addStateCounts(serverId, monitoring); addHeartBeatDataAsMember(serverId, monitoring); return monitoring; }  @UseCaseAdminFetchesMonitoringStatus(@PDSStep(name="service call",description = "service fetches job state counts and gathers hearbeats of cluster members by serverId",number=4)) PDSMonitoring getMonitoringStatus(); }
PDSMonitoringStatusService { @UseCaseAdminFetchesMonitoringStatus(@PDSStep(name="service call",description = "service fetches job state counts and gathers hearbeats of cluster members by serverId",number=4)) public PDSMonitoring getMonitoringStatus() { String serverId = serverConfiguratonService.getServerId(); PDSMonitoring monitoring = new PDSMonitoring(); addStateCounts(serverId, monitoring); addHeartBeatDataAsMember(serverId, monitoring); return monitoring; }  @UseCaseAdminFetchesMonitoringStatus(@PDSStep(name="service call",description = "service fetches job state counts and gathers hearbeats of cluster members by serverId",number=4)) PDSMonitoring getMonitoringStatus();  }