Loading src/main/java/it/inaf/oats/vospace/JobService.java +0 −3 Original line number Diff line number Diff line Loading @@ -65,12 +65,9 @@ public class JobService { throw new UnsupportedOperationException("Not implemented yet"); } job.setPhase(ExecutionPhase.COMPLETED); } catch (VoSpaceErrorSummarizableException e) { job.setPhase(ExecutionPhase.ERROR); job.setErrorSummary(ErrorSummaryFactory.newErrorSummary(e.getFault())); } finally { jobDAO.updateJob(job); } } Loading src/test/java/it/inaf/oats/vospace/TransferControllerTest.java +3 −3 Original line number Diff line number Diff line Loading @@ -143,9 +143,9 @@ public class TransferControllerTest { verify(nodeDao, times(1)).setNodeLocation(eq("/portalnode"), eq(2), eq("lbcr.20130512.060722.fits.gz")); verify(jobDao, times(2)).updateJob(argThat(j -> { verify(jobDao, times(1)).updateJob(argThat(j -> { assertTrue(j.getResults().get(0).getHref().startsWith("http://archive.lbto.org")); assertEquals(ExecutionPhase.COMPLETED, j.getPhase()); assertEquals(ExecutionPhase.EXECUTING, j.getPhase()); return true; })); } Loading Loading @@ -187,7 +187,7 @@ public class TransferControllerTest { .andExpect(status().is3xxRedirection()) .andReturn().getResponse().getHeader("Location"); verify(jobDao, times(2)).updateJob(any()); verify(jobDao, times(1)).updateJob(any()); assertThat(redirect, matchesPattern("^/transfers/.*")); } Loading Loading
src/main/java/it/inaf/oats/vospace/JobService.java +0 −3 Original line number Diff line number Diff line Loading @@ -65,12 +65,9 @@ public class JobService { throw new UnsupportedOperationException("Not implemented yet"); } job.setPhase(ExecutionPhase.COMPLETED); } catch (VoSpaceErrorSummarizableException e) { job.setPhase(ExecutionPhase.ERROR); job.setErrorSummary(ErrorSummaryFactory.newErrorSummary(e.getFault())); } finally { jobDAO.updateJob(job); } } Loading
src/test/java/it/inaf/oats/vospace/TransferControllerTest.java +3 −3 Original line number Diff line number Diff line Loading @@ -143,9 +143,9 @@ public class TransferControllerTest { verify(nodeDao, times(1)).setNodeLocation(eq("/portalnode"), eq(2), eq("lbcr.20130512.060722.fits.gz")); verify(jobDao, times(2)).updateJob(argThat(j -> { verify(jobDao, times(1)).updateJob(argThat(j -> { assertTrue(j.getResults().get(0).getHref().startsWith("http://archive.lbto.org")); assertEquals(ExecutionPhase.COMPLETED, j.getPhase()); assertEquals(ExecutionPhase.EXECUTING, j.getPhase()); return true; })); } Loading Loading @@ -187,7 +187,7 @@ public class TransferControllerTest { .andExpect(status().is3xxRedirection()) .andReturn().getResponse().getHeader("Location"); verify(jobDao, times(2)).updateJob(any()); verify(jobDao, times(1)).updateJob(any()); assertThat(redirect, matchesPattern("^/transfers/.*")); } Loading