@Test(dependsOnMethods = {"testInsert"}) public void testUpdate() throws IOException { for (JobExecutionInfo jobExecutionInfo : this.expectedJobExecutionInfos) { jobExecutionInfo.setEndTime(System.currentTimeMillis()); jobExecutionInfo.setDuration(jobExecutionInfo.getEndTime() - jobExecutionInfo.getStartTime()); jobExecutionInfo.setState(JobStateEnum.COMMITTED); jobExecutionInfo.setCompletedTasks(jobExecutionInfo.getLaunchedTasks()); for (TaskExecutionInfo taskExecutionInfo : jobExecutionInfo.getTaskExecutions()) { taskExecutionInfo.setEndTime(jobExecutionInfo.getEndTime()); taskExecutionInfo.setDuration(taskExecutionInfo.getEndTime() - taskExecutionInfo.getStartTime()); taskExecutionInfo.setState(TaskStateEnum.COMMITTED); } this.jobHistoryStore.put(jobExecutionInfo); } }
@Override public synchronized void put(JobExecutionInfo jobExecutionInfo) throws IOException { this.versionedStore.put(jobExecutionInfo); }
DatabaseJobHistoryStore implements JobHistoryStore { @Override public synchronized void put(JobExecutionInfo jobExecutionInfo) throws IOException { this.versionedStore.put(jobExecutionInfo); } }
DatabaseJobHistoryStore implements JobHistoryStore { @Override public synchronized void put(JobExecutionInfo jobExecutionInfo) throws IOException { this.versionedStore.put(jobExecutionInfo); } @Inject  DatabaseJobHistoryStore(DataSource dataSource); }
DatabaseJobHistoryStore implements JobHistoryStore { @Override public synchronized void put(JobExecutionInfo jobExecutionInfo) throws IOException { this.versionedStore.put(jobExecutionInfo); } @Inject  DatabaseJobHistoryStore(DataSource dataSource); @Override synchronized void put(JobExecutionInfo jobExecutionInfo); @Override synchronized List<JobExecutionInfo> get(JobExecutionQuery query); @Override void close(); }
DatabaseJobHistoryStore implements JobHistoryStore { @Override public synchronized void put(JobExecutionInfo jobExecutionInfo) throws IOException { this.versionedStore.put(jobExecutionInfo); } @Inject  DatabaseJobHistoryStore(DataSource dataSource); @Override synchronized void put(JobExecutionInfo jobExecutionInfo); @Override synchronized List<JobExecutionInfo> get(JobExecutionQuery query); @Override void close();  }