target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test void executeBeforeStepHooksWhenModuleToDeployIsNull() { Mockito.when(processTypeParser.getProcessType(any())) .thenReturn(ProcessType.DEPLOY); HooksExecutor hooksExecutor = new HooksExecutor(hooksCalculator, null); Mockito.when(hooksCalculator.isInPreExecuteStepPhase(StepPhase.EXECUTE)) .thenReturn(true); List<Ho...
public List<Hook> executeBeforeStepHooks(StepPhase currentStepPhase) { if (!hooksCalculator.isInPreExecuteStepPhase(currentStepPhase)) { return Collections.emptyList(); } return executeHooks(currentStepPhase); }
HooksExecutor { public List<Hook> executeBeforeStepHooks(StepPhase currentStepPhase) { if (!hooksCalculator.isInPreExecuteStepPhase(currentStepPhase)) { return Collections.emptyList(); } return executeHooks(currentStepPhase); } }
HooksExecutor { public List<Hook> executeBeforeStepHooks(StepPhase currentStepPhase) { if (!hooksCalculator.isInPreExecuteStepPhase(currentStepPhase)) { return Collections.emptyList(); } return executeHooks(currentStepPhase); } HooksExecutor(HooksCalculator hooksCalculator, Module moduleToDeploy); }
HooksExecutor { public List<Hook> executeBeforeStepHooks(StepPhase currentStepPhase) { if (!hooksCalculator.isInPreExecuteStepPhase(currentStepPhase)) { return Collections.emptyList(); } return executeHooks(currentStepPhase); } HooksExecutor(HooksCalculator hooksCalculator, Module moduleToDeploy); List<Hook> executeBef...
HooksExecutor { public List<Hook> executeBeforeStepHooks(StepPhase currentStepPhase) { if (!hooksCalculator.isInPreExecuteStepPhase(currentStepPhase)) { return Collections.emptyList(); } return executeHooks(currentStepPhase); } HooksExecutor(HooksCalculator hooksCalculator, Module moduleToDeploy); List<Hook> executeBef...
@Test void testIsProcessAtReceiveTask() { Mockito.when(flowableFacade.isProcessInstanceAtReceiveTask(PROCESS_ID)) .thenReturn(true); Assertions.assertEquals(State.ACTION_REQUIRED, processHelper.computeProcessState(PROCESS_ID)); }
public Operation.State computeProcessState(String processId) { if (isInAbortedState(processId)) { return State.ABORTED; } if (isInErrorState(processId)) { return State.ERROR; } if (isInReceiveTask(processId)) { return State.ACTION_REQUIRED; } if (isInRunningState(processId)) { return State.RUNNING; } return State.FINIS...
ProcessHelper { public Operation.State computeProcessState(String processId) { if (isInAbortedState(processId)) { return State.ABORTED; } if (isInErrorState(processId)) { return State.ERROR; } if (isInReceiveTask(processId)) { return State.ACTION_REQUIRED; } if (isInRunningState(processId)) { return State.RUNNING; } re...
ProcessHelper { public Operation.State computeProcessState(String processId) { if (isInAbortedState(processId)) { return State.ABORTED; } if (isInErrorState(processId)) { return State.ERROR; } if (isInReceiveTask(processId)) { return State.ACTION_REQUIRED; } if (isInRunningState(processId)) { return State.RUNNING; } re...
ProcessHelper { public Operation.State computeProcessState(String processId) { if (isInAbortedState(processId)) { return State.ABORTED; } if (isInErrorState(processId)) { return State.ERROR; } if (isInReceiveTask(processId)) { return State.ACTION_REQUIRED; } if (isInRunningState(processId)) { return State.RUNNING; } re...
ProcessHelper { public Operation.State computeProcessState(String processId) { if (isInAbortedState(processId)) { return State.ABORTED; } if (isInErrorState(processId)) { return State.ERROR; } if (isInReceiveTask(processId)) { return State.ACTION_REQUIRED; } if (isInRunningState(processId)) { return State.RUNNING; } re...
@Test void testIsProcessInErrorState() { Mockito.when(flowableFacade.hasDeadLetterJobs(PROCESS_ID)) .thenReturn(true); Assertions.assertEquals(State.ERROR, processHelper.computeProcessState(PROCESS_ID)); }
public Operation.State computeProcessState(String processId) { if (isInAbortedState(processId)) { return State.ABORTED; } if (isInErrorState(processId)) { return State.ERROR; } if (isInReceiveTask(processId)) { return State.ACTION_REQUIRED; } if (isInRunningState(processId)) { return State.RUNNING; } return State.FINIS...
ProcessHelper { public Operation.State computeProcessState(String processId) { if (isInAbortedState(processId)) { return State.ABORTED; } if (isInErrorState(processId)) { return State.ERROR; } if (isInReceiveTask(processId)) { return State.ACTION_REQUIRED; } if (isInRunningState(processId)) { return State.RUNNING; } re...
ProcessHelper { public Operation.State computeProcessState(String processId) { if (isInAbortedState(processId)) { return State.ABORTED; } if (isInErrorState(processId)) { return State.ERROR; } if (isInReceiveTask(processId)) { return State.ACTION_REQUIRED; } if (isInRunningState(processId)) { return State.RUNNING; } re...
ProcessHelper { public Operation.State computeProcessState(String processId) { if (isInAbortedState(processId)) { return State.ABORTED; } if (isInErrorState(processId)) { return State.ERROR; } if (isInReceiveTask(processId)) { return State.ACTION_REQUIRED; } if (isInRunningState(processId)) { return State.RUNNING; } re...
ProcessHelper { public Operation.State computeProcessState(String processId) { if (isInAbortedState(processId)) { return State.ABORTED; } if (isInErrorState(processId)) { return State.ERROR; } if (isInReceiveTask(processId)) { return State.ACTION_REQUIRED; } if (isInRunningState(processId)) { return State.RUNNING; } re...
@Test void closeQuietlyResultSet() throws SQLException { ResultSet resultSet = Mockito.mock(ResultSet.class); JdbcUtil.closeQuietly(resultSet); Mockito.verify(resultSet) .close(); }
public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } }
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } }
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } private Jdbc...
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } private Jdbc...
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } private Jdbc...
@Test void testIsProcessAbortedWhenThereIsAbortedProcess() { Mockito.when(historicOperationEventQuery.list()) .thenReturn(List.of(ImmutableHistoricOperationEvent.builder() .type(HistoricOperationEvent.EventType.ABORTED) .processId(PROCESS_ID) .build())); Assertions.assertEquals(State.ABORTED, processHelper.computeProce...
public Operation.State computeProcessState(String processId) { if (isInAbortedState(processId)) { return State.ABORTED; } if (isInErrorState(processId)) { return State.ERROR; } if (isInReceiveTask(processId)) { return State.ACTION_REQUIRED; } if (isInRunningState(processId)) { return State.RUNNING; } return State.FINIS...
ProcessHelper { public Operation.State computeProcessState(String processId) { if (isInAbortedState(processId)) { return State.ABORTED; } if (isInErrorState(processId)) { return State.ERROR; } if (isInReceiveTask(processId)) { return State.ACTION_REQUIRED; } if (isInRunningState(processId)) { return State.RUNNING; } re...
ProcessHelper { public Operation.State computeProcessState(String processId) { if (isInAbortedState(processId)) { return State.ABORTED; } if (isInErrorState(processId)) { return State.ERROR; } if (isInReceiveTask(processId)) { return State.ACTION_REQUIRED; } if (isInRunningState(processId)) { return State.RUNNING; } re...
ProcessHelper { public Operation.State computeProcessState(String processId) { if (isInAbortedState(processId)) { return State.ABORTED; } if (isInErrorState(processId)) { return State.ERROR; } if (isInReceiveTask(processId)) { return State.ACTION_REQUIRED; } if (isInRunningState(processId)) { return State.RUNNING; } re...
ProcessHelper { public Operation.State computeProcessState(String processId) { if (isInAbortedState(processId)) { return State.ABORTED; } if (isInErrorState(processId)) { return State.ERROR; } if (isInReceiveTask(processId)) { return State.ACTION_REQUIRED; } if (isInRunningState(processId)) { return State.RUNNING; } re...
@Test void testIsProcessAbortedWhenThereIsNotAbortedProcess() { mockHistoricEventsWithTypes(HistoricOperationEvent.EventType.FINISHED); Assertions.assertEquals(State.FINISHED, processHelper.computeProcessState(PROCESS_ID)); }
public Operation.State computeProcessState(String processId) { if (isInAbortedState(processId)) { return State.ABORTED; } if (isInErrorState(processId)) { return State.ERROR; } if (isInReceiveTask(processId)) { return State.ACTION_REQUIRED; } if (isInRunningState(processId)) { return State.RUNNING; } return State.FINIS...
ProcessHelper { public Operation.State computeProcessState(String processId) { if (isInAbortedState(processId)) { return State.ABORTED; } if (isInErrorState(processId)) { return State.ERROR; } if (isInReceiveTask(processId)) { return State.ACTION_REQUIRED; } if (isInRunningState(processId)) { return State.RUNNING; } re...
ProcessHelper { public Operation.State computeProcessState(String processId) { if (isInAbortedState(processId)) { return State.ABORTED; } if (isInErrorState(processId)) { return State.ERROR; } if (isInReceiveTask(processId)) { return State.ACTION_REQUIRED; } if (isInRunningState(processId)) { return State.RUNNING; } re...
ProcessHelper { public Operation.State computeProcessState(String processId) { if (isInAbortedState(processId)) { return State.ABORTED; } if (isInErrorState(processId)) { return State.ERROR; } if (isInReceiveTask(processId)) { return State.ACTION_REQUIRED; } if (isInRunningState(processId)) { return State.RUNNING; } re...
ProcessHelper { public Operation.State computeProcessState(String processId) { if (isInAbortedState(processId)) { return State.ABORTED; } if (isInErrorState(processId)) { return State.ERROR; } if (isInReceiveTask(processId)) { return State.ACTION_REQUIRED; } if (isInRunningState(processId)) { return State.RUNNING; } re...
@Test void detectSingularDeployedAppNullDeployedMta() { tester.test(() -> applicationColorDetector.detectSingularDeployedApplicationColor(null), new Expectation(null)); }
public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicationColor = CloudModelBuilde...
ApplicationColorDetector { public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicat...
ApplicationColorDetector { public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicat...
ApplicationColorDetector { public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicat...
ApplicationColorDetector { public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicat...
@Test void detectSingularDeployedApp3ModulesGreenSuffix() { DeployedMta deployedMta = createMta("com.sap.sample.mta.consumer", Collections.emptySet(), List.of(createMtaApplication("app-1", "app-1-green", parseDate("2019-04-04")), createMtaApplication("app-2", "app-2-green", parseDate("2019-04-05")), createMtaApplicatio...
public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicationColor = CloudModelBuilde...
ApplicationColorDetector { public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicat...
ApplicationColorDetector { public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicat...
ApplicationColorDetector { public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicat...
ApplicationColorDetector { public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicat...
@Test void detectSingularDeployedApp3ModulesBlueSuffix() { DeployedMta deployedMta = createMta("com.sap.sample.mta.consumer", Collections.emptySet(), List.of(createMtaApplication("app-1", "app-1-blue", parseDate("2019-04-04")), createMtaApplication("app-2", "app-2-blue", parseDate("2019-04-05")), createMtaApplication("...
public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicationColor = CloudModelBuilde...
ApplicationColorDetector { public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicat...
ApplicationColorDetector { public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicat...
ApplicationColorDetector { public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicat...
ApplicationColorDetector { public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicat...
@Test void detectSingularDeployedApp3ModulesNoSuffix() { DeployedMta deployedMta = createMta("com.sap.sample.mta.consumer", Collections.emptySet(), List.of(createMtaApplication("app-1", "app-1", parseDate("2019-04-04")), createMtaApplication("app-2", "app-2", parseDate("2019-04-05")), createMtaApplication("app-3", "app...
public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicationColor = CloudModelBuilde...
ApplicationColorDetector { public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicat...
ApplicationColorDetector { public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicat...
ApplicationColorDetector { public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicat...
ApplicationColorDetector { public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicat...
@Test void detectSingularDeployedApp3ModulesGreenBlueSuffix() { DeployedMta deployedMta = createMta("com.sap.sample.mta.consumer", Collections.emptySet(), List.of(createMtaApplication("app-1", "app-1-blue", parseDate("2016-15-10")), createMtaApplication("app-2", "app-2-green", parseDate("2016-10-10")), createMtaApplica...
public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicationColor = CloudModelBuilde...
ApplicationColorDetector { public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicat...
ApplicationColorDetector { public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicat...
ApplicationColorDetector { public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicat...
ApplicationColorDetector { public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicat...
@Test void detectSingularDeployedAppNoModule() { DeployedMta deployedMta = createMta("com.sap.sample.mta.consumer", Collections.emptySet(), Collections.emptyList()); Expectation expectation = new Expectation(null); tester.test(() -> applicationColorDetector.detectSingularDeployedApplicationColor(deployedMta), expectati...
public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicationColor = CloudModelBuilde...
ApplicationColorDetector { public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicat...
ApplicationColorDetector { public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicat...
ApplicationColorDetector { public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicat...
ApplicationColorDetector { public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicat...
@Test void detectSingularDeployedApp2ModuleBlueGreenSuffix() { DeployedMta deployedMta = createMta("com.sap.sample.mta.consumer", Collections.emptySet(), List.of(createMtaApplication("consumer", "consumer-green", parseDate("2016-15-10")), createMtaApplication("consumer", "consumer-blue", parseDate("2016-10-10")))); Exp...
public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicationColor = CloudModelBuilde...
ApplicationColorDetector { public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicat...
ApplicationColorDetector { public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicat...
ApplicationColorDetector { public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicat...
ApplicationColorDetector { public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicat...
@Test void detectLiveApplicationColorNullDeployedMta() { tester.test(() -> detectLiveApplicationColor(null), new Expectation(null)); }
public ApplicationColor detectLiveApplicationColor(DeployedMta deployedMta, String correlationId) { if (deployedMta == null) { return null; } ApplicationColor olderApplicationColor = getOlderApplicationColor(deployedMta); Operation currentOperation = operationService.createQuery() .processId(correlationId) .singleResul...
ApplicationColorDetector { public ApplicationColor detectLiveApplicationColor(DeployedMta deployedMta, String correlationId) { if (deployedMta == null) { return null; } ApplicationColor olderApplicationColor = getOlderApplicationColor(deployedMta); Operation currentOperation = operationService.createQuery() .processId(...
ApplicationColorDetector { public ApplicationColor detectLiveApplicationColor(DeployedMta deployedMta, String correlationId) { if (deployedMta == null) { return null; } ApplicationColor olderApplicationColor = getOlderApplicationColor(deployedMta); Operation currentOperation = operationService.createQuery() .processId(...
ApplicationColorDetector { public ApplicationColor detectLiveApplicationColor(DeployedMta deployedMta, String correlationId) { if (deployedMta == null) { return null; } ApplicationColor olderApplicationColor = getOlderApplicationColor(deployedMta); Operation currentOperation = operationService.createQuery() .processId(...
ApplicationColorDetector { public ApplicationColor detectLiveApplicationColor(DeployedMta deployedMta, String correlationId) { if (deployedMta == null) { return null; } ApplicationColor olderApplicationColor = getOlderApplicationColor(deployedMta); Operation currentOperation = operationService.createQuery() .processId(...
@Test void closeQuietlyResultSetWithException() throws SQLException { ResultSet resultSet = Mockito.mock(ResultSet.class); Mockito.doThrow(new SQLException()) .when(resultSet) .close(); JdbcUtil.closeQuietly(resultSet); Mockito.verify(resultSet) .close(); }
public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } }
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } }
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } private Jdbc...
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } private Jdbc...
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } private Jdbc...
@Test void detectLiveApplicationColorPhaseNotFound() { Expectation expectation = new Expectation(GREEN); mockOperationService(createFakeOperation(Operation.State.RUNNING, FAKE_PROCESS_ID), createFakeOperation(Operation.State.ABORTED, FAKE_BLUE_GREEN_DEPLOY_HISTORIC_PROCESS_INSTANCE_ID)); mockHistoricVariableInstanceCol...
public ApplicationColor detectLiveApplicationColor(DeployedMta deployedMta, String correlationId) { if (deployedMta == null) { return null; } ApplicationColor olderApplicationColor = getOlderApplicationColor(deployedMta); Operation currentOperation = operationService.createQuery() .processId(correlationId) .singleResul...
ApplicationColorDetector { public ApplicationColor detectLiveApplicationColor(DeployedMta deployedMta, String correlationId) { if (deployedMta == null) { return null; } ApplicationColor olderApplicationColor = getOlderApplicationColor(deployedMta); Operation currentOperation = operationService.createQuery() .processId(...
ApplicationColorDetector { public ApplicationColor detectLiveApplicationColor(DeployedMta deployedMta, String correlationId) { if (deployedMta == null) { return null; } ApplicationColor olderApplicationColor = getOlderApplicationColor(deployedMta); Operation currentOperation = operationService.createQuery() .processId(...
ApplicationColorDetector { public ApplicationColor detectLiveApplicationColor(DeployedMta deployedMta, String correlationId) { if (deployedMta == null) { return null; } ApplicationColor olderApplicationColor = getOlderApplicationColor(deployedMta); Operation currentOperation = operationService.createQuery() .processId(...
ApplicationColorDetector { public ApplicationColor detectLiveApplicationColor(DeployedMta deployedMta, String correlationId) { if (deployedMta == null) { return null; } ApplicationColor olderApplicationColor = getOlderApplicationColor(deployedMta); Operation currentOperation = operationService.createQuery() .processId(...
@Test void detectLiveApplicationColorMtaColoNotFound() { Expectation expectation = new Expectation(GREEN); mockOperationService(createFakeOperation(Operation.State.RUNNING, FAKE_PROCESS_ID), createFakeOperation(Operation.State.ABORTED, FAKE_BLUE_GREEN_DEPLOY_HISTORIC_PROCESS_INSTANCE_ID)); mockHistoricVariableInstanceP...
public ApplicationColor detectLiveApplicationColor(DeployedMta deployedMta, String correlationId) { if (deployedMta == null) { return null; } ApplicationColor olderApplicationColor = getOlderApplicationColor(deployedMta); Operation currentOperation = operationService.createQuery() .processId(correlationId) .singleResul...
ApplicationColorDetector { public ApplicationColor detectLiveApplicationColor(DeployedMta deployedMta, String correlationId) { if (deployedMta == null) { return null; } ApplicationColor olderApplicationColor = getOlderApplicationColor(deployedMta); Operation currentOperation = operationService.createQuery() .processId(...
ApplicationColorDetector { public ApplicationColor detectLiveApplicationColor(DeployedMta deployedMta, String correlationId) { if (deployedMta == null) { return null; } ApplicationColor olderApplicationColor = getOlderApplicationColor(deployedMta); Operation currentOperation = operationService.createQuery() .processId(...
ApplicationColorDetector { public ApplicationColor detectLiveApplicationColor(DeployedMta deployedMta, String correlationId) { if (deployedMta == null) { return null; } ApplicationColor olderApplicationColor = getOlderApplicationColor(deployedMta); Operation currentOperation = operationService.createQuery() .processId(...
ApplicationColorDetector { public ApplicationColor detectLiveApplicationColor(DeployedMta deployedMta, String correlationId) { if (deployedMta == null) { return null; } ApplicationColor olderApplicationColor = getOlderApplicationColor(deployedMta); Operation currentOperation = operationService.createQuery() .processId(...
@Test void detectLiveApplicationColorNoOperations() { Expectation expectation = new Expectation(GREEN); mockOperationServiceNoOtherOperations(createFakeOperation(Operation.State.RUNNING, FAKE_PROCESS_ID)); tester.test(() -> detectLiveApplicationColor(readResource("deployed-mta-02.json", DeployedMta.class)), expectation...
public ApplicationColor detectLiveApplicationColor(DeployedMta deployedMta, String correlationId) { if (deployedMta == null) { return null; } ApplicationColor olderApplicationColor = getOlderApplicationColor(deployedMta); Operation currentOperation = operationService.createQuery() .processId(correlationId) .singleResul...
ApplicationColorDetector { public ApplicationColor detectLiveApplicationColor(DeployedMta deployedMta, String correlationId) { if (deployedMta == null) { return null; } ApplicationColor olderApplicationColor = getOlderApplicationColor(deployedMta); Operation currentOperation = operationService.createQuery() .processId(...
ApplicationColorDetector { public ApplicationColor detectLiveApplicationColor(DeployedMta deployedMta, String correlationId) { if (deployedMta == null) { return null; } ApplicationColor olderApplicationColor = getOlderApplicationColor(deployedMta); Operation currentOperation = operationService.createQuery() .processId(...
ApplicationColorDetector { public ApplicationColor detectLiveApplicationColor(DeployedMta deployedMta, String correlationId) { if (deployedMta == null) { return null; } ApplicationColor olderApplicationColor = getOlderApplicationColor(deployedMta); Operation currentOperation = operationService.createQuery() .processId(...
ApplicationColorDetector { public ApplicationColor detectLiveApplicationColor(DeployedMta deployedMta, String correlationId) { if (deployedMta == null) { return null; } ApplicationColor olderApplicationColor = getOlderApplicationColor(deployedMta); Operation currentOperation = operationService.createQuery() .processId(...
@Test void testDetermineModuleToDeployModuleIsSet() { ModuleDeterminer moduleDeterminer = createModuleDeterminer(); context.setVariable(Variables.MODULE_TO_DEPLOY, createModule("test-module")); Module module = moduleDeterminer.determineModuleToDeploy(); Assertions.assertEquals("test-module", module.getName()); }
public Module determineModuleToDeploy() { Module moduleToDeploy = getContext().getVariable(Variables.MODULE_TO_DEPLOY); return moduleToDeploy != null ? moduleToDeploy : determineModule(); }
ModuleDeterminer { public Module determineModuleToDeploy() { Module moduleToDeploy = getContext().getVariable(Variables.MODULE_TO_DEPLOY); return moduleToDeploy != null ? moduleToDeploy : determineModule(); } }
ModuleDeterminer { public Module determineModuleToDeploy() { Module moduleToDeploy = getContext().getVariable(Variables.MODULE_TO_DEPLOY); return moduleToDeploy != null ? moduleToDeploy : determineModule(); } }
ModuleDeterminer { public Module determineModuleToDeploy() { Module moduleToDeploy = getContext().getVariable(Variables.MODULE_TO_DEPLOY); return moduleToDeploy != null ? moduleToDeploy : determineModule(); } Module determineModuleToDeploy(); abstract MtaMetadataParser getMtaMetadataParser(); abstract ProcessContext g...
ModuleDeterminer { public Module determineModuleToDeploy() { Module moduleToDeploy = getContext().getVariable(Variables.MODULE_TO_DEPLOY); return moduleToDeploy != null ? moduleToDeploy : determineModule(); } Module determineModuleToDeploy(); abstract MtaMetadataParser getMtaMetadataParser(); abstract ProcessContext g...
@Test void testDetermineModuleIfModuleIsNotSetAnywhere() { ModuleDeterminer moduleDeterminer = createModuleDeterminer(); Assertions.assertNull(moduleDeterminer.determineModuleToDeploy()); }
public Module determineModuleToDeploy() { Module moduleToDeploy = getContext().getVariable(Variables.MODULE_TO_DEPLOY); return moduleToDeploy != null ? moduleToDeploy : determineModule(); }
ModuleDeterminer { public Module determineModuleToDeploy() { Module moduleToDeploy = getContext().getVariable(Variables.MODULE_TO_DEPLOY); return moduleToDeploy != null ? moduleToDeploy : determineModule(); } }
ModuleDeterminer { public Module determineModuleToDeploy() { Module moduleToDeploy = getContext().getVariable(Variables.MODULE_TO_DEPLOY); return moduleToDeploy != null ? moduleToDeploy : determineModule(); } }
ModuleDeterminer { public Module determineModuleToDeploy() { Module moduleToDeploy = getContext().getVariable(Variables.MODULE_TO_DEPLOY); return moduleToDeploy != null ? moduleToDeploy : determineModule(); } Module determineModuleToDeploy(); abstract MtaMetadataParser getMtaMetadataParser(); abstract ProcessContext g...
ModuleDeterminer { public Module determineModuleToDeploy() { Module moduleToDeploy = getContext().getVariable(Variables.MODULE_TO_DEPLOY); return moduleToDeploy != null ? moduleToDeploy : determineModule(); } Module determineModuleToDeploy(); abstract MtaMetadataParser getMtaMetadataParser(); abstract ProcessContext g...
@Test void testDetermineModuleIfModuleIsNotSet() { ModuleDeterminer moduleDeterminer = createModuleDeterminer(); DeploymentDescriptor completeDeploymentDescriptor = createDeploymentDescriptor(); Module moduleToDeploy = createModule("some-module-name"); completeDeploymentDescriptor.setModules(List.of(moduleToDeploy)); c...
public Module determineModuleToDeploy() { Module moduleToDeploy = getContext().getVariable(Variables.MODULE_TO_DEPLOY); return moduleToDeploy != null ? moduleToDeploy : determineModule(); }
ModuleDeterminer { public Module determineModuleToDeploy() { Module moduleToDeploy = getContext().getVariable(Variables.MODULE_TO_DEPLOY); return moduleToDeploy != null ? moduleToDeploy : determineModule(); } }
ModuleDeterminer { public Module determineModuleToDeploy() { Module moduleToDeploy = getContext().getVariable(Variables.MODULE_TO_DEPLOY); return moduleToDeploy != null ? moduleToDeploy : determineModule(); } }
ModuleDeterminer { public Module determineModuleToDeploy() { Module moduleToDeploy = getContext().getVariable(Variables.MODULE_TO_DEPLOY); return moduleToDeploy != null ? moduleToDeploy : determineModule(); } Module determineModuleToDeploy(); abstract MtaMetadataParser getMtaMetadataParser(); abstract ProcessContext g...
ModuleDeterminer { public Module determineModuleToDeploy() { Module moduleToDeploy = getContext().getVariable(Variables.MODULE_TO_DEPLOY); return moduleToDeploy != null ? moduleToDeploy : determineModule(); } Module determineModuleToDeploy(); abstract MtaMetadataParser getMtaMetadataParser(); abstract ProcessContext g...
@Test void testAcquireLock() { SLException exception = assertThrows(SLException.class, this::tryToAcquireLock); assertEquals("Conflicting process \"test-process-id\" found for MTA \"test-mta-id\"", exception.getMessage()); }
public synchronized void acquireLock(String mtaId, String namespace, String spaceId, String processId) { LOGGER.info(format(Messages.ACQUIRING_LOCK, processId, mtaId)); validateNoConflictingOperationsExist(mtaId, namespace, spaceId); Operation currentOperation = getOperationByProcessId(processId); ImmutableOperation.Bu...
ProcessConflictPreventer { public synchronized void acquireLock(String mtaId, String namespace, String spaceId, String processId) { LOGGER.info(format(Messages.ACQUIRING_LOCK, processId, mtaId)); validateNoConflictingOperationsExist(mtaId, namespace, spaceId); Operation currentOperation = getOperationByProcessId(proces...
ProcessConflictPreventer { public synchronized void acquireLock(String mtaId, String namespace, String spaceId, String processId) { LOGGER.info(format(Messages.ACQUIRING_LOCK, processId, mtaId)); validateNoConflictingOperationsExist(mtaId, namespace, spaceId); Operation currentOperation = getOperationByProcessId(proces...
ProcessConflictPreventer { public synchronized void acquireLock(String mtaId, String namespace, String spaceId, String processId) { LOGGER.info(format(Messages.ACQUIRING_LOCK, processId, mtaId)); validateNoConflictingOperationsExist(mtaId, namespace, spaceId); Operation currentOperation = getOperationByProcessId(proces...
ProcessConflictPreventer { public synchronized void acquireLock(String mtaId, String namespace, String spaceId, String processId) { LOGGER.info(format(Messages.ACQUIRING_LOCK, processId, mtaId)); validateNoConflictingOperationsExist(mtaId, namespace, spaceId); Operation currentOperation = getOperationByProcessId(proces...
@Test void testAcquireLockWithNoConflictingOperations() { assertDoesNotThrow(() -> processConflictPreventerMock.acquireLock(testMtaId, null, testSpaceId, testProcessId)); }
public synchronized void acquireLock(String mtaId, String namespace, String spaceId, String processId) { LOGGER.info(format(Messages.ACQUIRING_LOCK, processId, mtaId)); validateNoConflictingOperationsExist(mtaId, namespace, spaceId); Operation currentOperation = getOperationByProcessId(processId); ImmutableOperation.Bu...
ProcessConflictPreventer { public synchronized void acquireLock(String mtaId, String namespace, String spaceId, String processId) { LOGGER.info(format(Messages.ACQUIRING_LOCK, processId, mtaId)); validateNoConflictingOperationsExist(mtaId, namespace, spaceId); Operation currentOperation = getOperationByProcessId(proces...
ProcessConflictPreventer { public synchronized void acquireLock(String mtaId, String namespace, String spaceId, String processId) { LOGGER.info(format(Messages.ACQUIRING_LOCK, processId, mtaId)); validateNoConflictingOperationsExist(mtaId, namespace, spaceId); Operation currentOperation = getOperationByProcessId(proces...
ProcessConflictPreventer { public synchronized void acquireLock(String mtaId, String namespace, String spaceId, String processId) { LOGGER.info(format(Messages.ACQUIRING_LOCK, processId, mtaId)); validateNoConflictingOperationsExist(mtaId, namespace, spaceId); Operation currentOperation = getOperationByProcessId(proces...
ProcessConflictPreventer { public synchronized void acquireLock(String mtaId, String namespace, String spaceId, String processId) { LOGGER.info(format(Messages.ACQUIRING_LOCK, processId, mtaId)); validateNoConflictingOperationsExist(mtaId, namespace, spaceId); Operation currentOperation = getOperationByProcessId(proces...
@Test void testReleaseLock() { Operation.State abortedState = Operation.State.ABORTED; processConflictPreventerMock.releaseLock(testProcessId, abortedState); ArgumentCaptor<Operation> argumentCaptor = ArgumentCaptor.forClass(Operation.class); verify(operationServiceMock).update(argumentCaptor.capture(), argThat(this::a...
public void releaseLock(String processInstanceId, Operation.State state) { Operation operation = getOperationByProcessId(processInstanceId); LOGGER.info(MessageFormat.format(Messages.PROCESS_0_RELEASING_LOCK_FOR_MTA_1_IN_SPACE_2, operation.getProcessId(), operation.getMtaId(), operation.getSpaceId())); operation = Immu...
ProcessConflictPreventer { public void releaseLock(String processInstanceId, Operation.State state) { Operation operation = getOperationByProcessId(processInstanceId); LOGGER.info(MessageFormat.format(Messages.PROCESS_0_RELEASING_LOCK_FOR_MTA_1_IN_SPACE_2, operation.getProcessId(), operation.getMtaId(), operation.getSp...
ProcessConflictPreventer { public void releaseLock(String processInstanceId, Operation.State state) { Operation operation = getOperationByProcessId(processInstanceId); LOGGER.info(MessageFormat.format(Messages.PROCESS_0_RELEASING_LOCK_FOR_MTA_1_IN_SPACE_2, operation.getProcessId(), operation.getMtaId(), operation.getSp...
ProcessConflictPreventer { public void releaseLock(String processInstanceId, Operation.State state) { Operation operation = getOperationByProcessId(processInstanceId); LOGGER.info(MessageFormat.format(Messages.PROCESS_0_RELEASING_LOCK_FOR_MTA_1_IN_SPACE_2, operation.getProcessId(), operation.getMtaId(), operation.getSp...
ProcessConflictPreventer { public void releaseLock(String processInstanceId, Operation.State state) { Operation operation = getOperationByProcessId(processInstanceId); LOGGER.info(MessageFormat.format(Messages.PROCESS_0_RELEASING_LOCK_FOR_MTA_1_IN_SPACE_2, operation.getProcessId(), operation.getMtaId(), operation.getSp...
@Test void testOperationTimeWithNoSubProcesses() { Map<String, ProcessTime> processTimes = new HashMap<>(); processTimes.put(CORRELATION_ID, createProcessTime(100, 200)); ProcessTime overallProcessTime = operationTimeAggregator.computeOverallProcessTime(CORRELATION_ID, processTimes); assertEquals(100, overallProcessTim...
public ProcessTime computeOverallProcessTime(String correlationId, Map<String, ProcessTime> processTimes) { ProcessTime rootProcessTime = processTimes.get(correlationId); long overallDelayBetweenSteps = processTimes.values() .stream() .mapToLong(ProcessTime::getDelayBetweenSteps) .sum(); return ImmutableProcessTime.cop...
OperationTimeAggregator { public ProcessTime computeOverallProcessTime(String correlationId, Map<String, ProcessTime> processTimes) { ProcessTime rootProcessTime = processTimes.get(correlationId); long overallDelayBetweenSteps = processTimes.values() .stream() .mapToLong(ProcessTime::getDelayBetweenSteps) .sum(); retur...
OperationTimeAggregator { public ProcessTime computeOverallProcessTime(String correlationId, Map<String, ProcessTime> processTimes) { ProcessTime rootProcessTime = processTimes.get(correlationId); long overallDelayBetweenSteps = processTimes.values() .stream() .mapToLong(ProcessTime::getDelayBetweenSteps) .sum(); retur...
OperationTimeAggregator { public ProcessTime computeOverallProcessTime(String correlationId, Map<String, ProcessTime> processTimes) { ProcessTime rootProcessTime = processTimes.get(correlationId); long overallDelayBetweenSteps = processTimes.values() .stream() .mapToLong(ProcessTime::getDelayBetweenSteps) .sum(); retur...
OperationTimeAggregator { public ProcessTime computeOverallProcessTime(String correlationId, Map<String, ProcessTime> processTimes) { ProcessTime rootProcessTime = processTimes.get(correlationId); long overallDelayBetweenSteps = processTimes.values() .stream() .mapToLong(ProcessTime::getDelayBetweenSteps) .sum(); retur...
@Test void closeQuietlyResultSetWithNull() { ResultSet resultSet = null; Assertions.assertDoesNotThrow(() -> JdbcUtil.closeQuietly(resultSet)); }
public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } }
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } }
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } private Jdbc...
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } private Jdbc...
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } private Jdbc...
@Test void testOperationTimeWithInvalidInput() { assertThrows(NullPointerException.class, () -> operationTimeAggregator.computeOverallProcessTime(CORRELATION_ID, Collections.emptyMap())); }
public ProcessTime computeOverallProcessTime(String correlationId, Map<String, ProcessTime> processTimes) { ProcessTime rootProcessTime = processTimes.get(correlationId); long overallDelayBetweenSteps = processTimes.values() .stream() .mapToLong(ProcessTime::getDelayBetweenSteps) .sum(); return ImmutableProcessTime.cop...
OperationTimeAggregator { public ProcessTime computeOverallProcessTime(String correlationId, Map<String, ProcessTime> processTimes) { ProcessTime rootProcessTime = processTimes.get(correlationId); long overallDelayBetweenSteps = processTimes.values() .stream() .mapToLong(ProcessTime::getDelayBetweenSteps) .sum(); retur...
OperationTimeAggregator { public ProcessTime computeOverallProcessTime(String correlationId, Map<String, ProcessTime> processTimes) { ProcessTime rootProcessTime = processTimes.get(correlationId); long overallDelayBetweenSteps = processTimes.values() .stream() .mapToLong(ProcessTime::getDelayBetweenSteps) .sum(); retur...
OperationTimeAggregator { public ProcessTime computeOverallProcessTime(String correlationId, Map<String, ProcessTime> processTimes) { ProcessTime rootProcessTime = processTimes.get(correlationId); long overallDelayBetweenSteps = processTimes.values() .stream() .mapToLong(ProcessTime::getDelayBetweenSteps) .sum(); retur...
OperationTimeAggregator { public ProcessTime computeOverallProcessTime(String correlationId, Map<String, ProcessTime> processTimes) { ProcessTime rootProcessTime = processTimes.get(correlationId); long overallDelayBetweenSteps = processTimes.values() .stream() .mapToLong(ProcessTime::getDelayBetweenSteps) .sum(); retur...
@Test void testOperationTimeWithOneSubProcess() { Map<String, ProcessTime> processTimes = new HashMap<>(); processTimes.put(CORRELATION_ID, createProcessTime(100, 200)); processTimes.put("id-1", createProcessTime(50, 100)); ProcessTime overallProcessTime = operationTimeAggregator.computeOverallProcessTime(CORRELATION_I...
public ProcessTime computeOverallProcessTime(String correlationId, Map<String, ProcessTime> processTimes) { ProcessTime rootProcessTime = processTimes.get(correlationId); long overallDelayBetweenSteps = processTimes.values() .stream() .mapToLong(ProcessTime::getDelayBetweenSteps) .sum(); return ImmutableProcessTime.cop...
OperationTimeAggregator { public ProcessTime computeOverallProcessTime(String correlationId, Map<String, ProcessTime> processTimes) { ProcessTime rootProcessTime = processTimes.get(correlationId); long overallDelayBetweenSteps = processTimes.values() .stream() .mapToLong(ProcessTime::getDelayBetweenSteps) .sum(); retur...
OperationTimeAggregator { public ProcessTime computeOverallProcessTime(String correlationId, Map<String, ProcessTime> processTimes) { ProcessTime rootProcessTime = processTimes.get(correlationId); long overallDelayBetweenSteps = processTimes.values() .stream() .mapToLong(ProcessTime::getDelayBetweenSteps) .sum(); retur...
OperationTimeAggregator { public ProcessTime computeOverallProcessTime(String correlationId, Map<String, ProcessTime> processTimes) { ProcessTime rootProcessTime = processTimes.get(correlationId); long overallDelayBetweenSteps = processTimes.values() .stream() .mapToLong(ProcessTime::getDelayBetweenSteps) .sum(); retur...
OperationTimeAggregator { public ProcessTime computeOverallProcessTime(String correlationId, Map<String, ProcessTime> processTimes) { ProcessTime rootProcessTime = processTimes.get(correlationId); long overallDelayBetweenSteps = processTimes.values() .stream() .mapToLong(ProcessTime::getDelayBetweenSteps) .sum(); retur...
@Test void testOperationTimeWithTwoSubProcesses() { Map<String, ProcessTime> processTimes = new HashMap<>(); processTimes.put(CORRELATION_ID, createProcessTime(100, 200)); processTimes.put("id-1", createProcessTime(50, 100)); processTimes.put("id-2", createProcessTime(70, 300)); ProcessTime overallProcessTime = operati...
public ProcessTime computeOverallProcessTime(String correlationId, Map<String, ProcessTime> processTimes) { ProcessTime rootProcessTime = processTimes.get(correlationId); long overallDelayBetweenSteps = processTimes.values() .stream() .mapToLong(ProcessTime::getDelayBetweenSteps) .sum(); return ImmutableProcessTime.cop...
OperationTimeAggregator { public ProcessTime computeOverallProcessTime(String correlationId, Map<String, ProcessTime> processTimes) { ProcessTime rootProcessTime = processTimes.get(correlationId); long overallDelayBetweenSteps = processTimes.values() .stream() .mapToLong(ProcessTime::getDelayBetweenSteps) .sum(); retur...
OperationTimeAggregator { public ProcessTime computeOverallProcessTime(String correlationId, Map<String, ProcessTime> processTimes) { ProcessTime rootProcessTime = processTimes.get(correlationId); long overallDelayBetweenSteps = processTimes.values() .stream() .mapToLong(ProcessTime::getDelayBetweenSteps) .sum(); retur...
OperationTimeAggregator { public ProcessTime computeOverallProcessTime(String correlationId, Map<String, ProcessTime> processTimes) { ProcessTime rootProcessTime = processTimes.get(correlationId); long overallDelayBetweenSteps = processTimes.values() .stream() .mapToLong(ProcessTime::getDelayBetweenSteps) .sum(); retur...
OperationTimeAggregator { public ProcessTime computeOverallProcessTime(String correlationId, Map<String, ProcessTime> processTimes) { ProcessTime rootProcessTime = processTimes.get(correlationId); long overallDelayBetweenSteps = processTimes.values() .stream() .mapToLong(ProcessTime::getDelayBetweenSteps) .sum(); retur...
@Test void testBuildHookPhaseForDeployProcess() { Mockito.when(processTypeParser.getProcessType(context.getExecution())) .thenReturn(ProcessType.DEPLOY); HooksPhaseBuilder hooksPhaseBuilder = new HooksPhaseBuilder(processTypeParser); List<HookPhase> hookPhases = hooksPhaseBuilder.buildHookPhases(List.of(HookPhase.BEFOR...
public List<HookPhase> buildHookPhases(List<HookPhase> hookPhases, ProcessContext context) { return hookPhases.stream() .map(hookPhase -> buildPhase(hookPhase, context)) .map(HookPhase::fromString) .collect(Collectors.toList()); }
HooksPhaseBuilder { public List<HookPhase> buildHookPhases(List<HookPhase> hookPhases, ProcessContext context) { return hookPhases.stream() .map(hookPhase -> buildPhase(hookPhase, context)) .map(HookPhase::fromString) .collect(Collectors.toList()); } }
HooksPhaseBuilder { public List<HookPhase> buildHookPhases(List<HookPhase> hookPhases, ProcessContext context) { return hookPhases.stream() .map(hookPhase -> buildPhase(hookPhase, context)) .map(HookPhase::fromString) .collect(Collectors.toList()); } @Inject HooksPhaseBuilder(ProcessTypeParser processTypeParser); }
HooksPhaseBuilder { public List<HookPhase> buildHookPhases(List<HookPhase> hookPhases, ProcessContext context) { return hookPhases.stream() .map(hookPhase -> buildPhase(hookPhase, context)) .map(HookPhase::fromString) .collect(Collectors.toList()); } @Inject HooksPhaseBuilder(ProcessTypeParser processTypeParser); List...
HooksPhaseBuilder { public List<HookPhase> buildHookPhases(List<HookPhase> hookPhases, ProcessContext context) { return hookPhases.stream() .map(hookPhase -> buildPhase(hookPhase, context)) .map(HookPhase::fromString) .collect(Collectors.toList()); } @Inject HooksPhaseBuilder(ProcessTypeParser processTypeParser); List...
@Test void testBuildHookPhaseForBlueGreenDeployProcessWithSubprocessPhaseBeforeApplicationStop() { Mockito.when(processTypeParser.getProcessType(context.getExecution())) .thenReturn(ProcessType.BLUE_GREEN_DEPLOY); context.setVariable(Variables.SUBPROCESS_PHASE, SubprocessPhase.BEFORE_APPLICATION_STOP); HooksPhaseBuilde...
public List<HookPhase> buildHookPhases(List<HookPhase> hookPhases, ProcessContext context) { return hookPhases.stream() .map(hookPhase -> buildPhase(hookPhase, context)) .map(HookPhase::fromString) .collect(Collectors.toList()); }
HooksPhaseBuilder { public List<HookPhase> buildHookPhases(List<HookPhase> hookPhases, ProcessContext context) { return hookPhases.stream() .map(hookPhase -> buildPhase(hookPhase, context)) .map(HookPhase::fromString) .collect(Collectors.toList()); } }
HooksPhaseBuilder { public List<HookPhase> buildHookPhases(List<HookPhase> hookPhases, ProcessContext context) { return hookPhases.stream() .map(hookPhase -> buildPhase(hookPhase, context)) .map(HookPhase::fromString) .collect(Collectors.toList()); } @Inject HooksPhaseBuilder(ProcessTypeParser processTypeParser); }
HooksPhaseBuilder { public List<HookPhase> buildHookPhases(List<HookPhase> hookPhases, ProcessContext context) { return hookPhases.stream() .map(hookPhase -> buildPhase(hookPhase, context)) .map(HookPhase::fromString) .collect(Collectors.toList()); } @Inject HooksPhaseBuilder(ProcessTypeParser processTypeParser); List...
HooksPhaseBuilder { public List<HookPhase> buildHookPhases(List<HookPhase> hookPhases, ProcessContext context) { return hookPhases.stream() .map(hookPhase -> buildPhase(hookPhase, context)) .map(HookPhase::fromString) .collect(Collectors.toList()); } @Inject HooksPhaseBuilder(ProcessTypeParser processTypeParser); List...
@Test void testBuildHookPhaseForBlueGreenDeployProcessWithSubprocessPhaseBeforeApplicationStart() { Mockito.when(processTypeParser.getProcessType(context.getExecution())) .thenReturn(ProcessType.BLUE_GREEN_DEPLOY); context.setVariable(Variables.SUBPROCESS_PHASE, SubprocessPhase.BEFORE_APPLICATION_START); HooksPhaseBuil...
public List<HookPhase> buildHookPhases(List<HookPhase> hookPhases, ProcessContext context) { return hookPhases.stream() .map(hookPhase -> buildPhase(hookPhase, context)) .map(HookPhase::fromString) .collect(Collectors.toList()); }
HooksPhaseBuilder { public List<HookPhase> buildHookPhases(List<HookPhase> hookPhases, ProcessContext context) { return hookPhases.stream() .map(hookPhase -> buildPhase(hookPhase, context)) .map(HookPhase::fromString) .collect(Collectors.toList()); } }
HooksPhaseBuilder { public List<HookPhase> buildHookPhases(List<HookPhase> hookPhases, ProcessContext context) { return hookPhases.stream() .map(hookPhase -> buildPhase(hookPhase, context)) .map(HookPhase::fromString) .collect(Collectors.toList()); } @Inject HooksPhaseBuilder(ProcessTypeParser processTypeParser); }
HooksPhaseBuilder { public List<HookPhase> buildHookPhases(List<HookPhase> hookPhases, ProcessContext context) { return hookPhases.stream() .map(hookPhase -> buildPhase(hookPhase, context)) .map(HookPhase::fromString) .collect(Collectors.toList()); } @Inject HooksPhaseBuilder(ProcessTypeParser processTypeParser); List...
HooksPhaseBuilder { public List<HookPhase> buildHookPhases(List<HookPhase> hookPhases, ProcessContext context) { return hookPhases.stream() .map(hookPhase -> buildPhase(hookPhase, context)) .map(HookPhase::fromString) .collect(Collectors.toList()); } @Inject HooksPhaseBuilder(ProcessTypeParser processTypeParser); List...
@Test void testBuildHookPhaseForBlueGreenProcessWithPhaseUndeploy() { Mockito.when(processTypeParser.getProcessType(context.getExecution())) .thenReturn(ProcessType.BLUE_GREEN_DEPLOY); context.setVariable(Variables.PHASE, Phase.UNDEPLOY); HooksPhaseBuilder hooksPhaseBuilder = new HooksPhaseBuilder(processTypeParser); L...
public List<HookPhase> buildHookPhases(List<HookPhase> hookPhases, ProcessContext context) { return hookPhases.stream() .map(hookPhase -> buildPhase(hookPhase, context)) .map(HookPhase::fromString) .collect(Collectors.toList()); }
HooksPhaseBuilder { public List<HookPhase> buildHookPhases(List<HookPhase> hookPhases, ProcessContext context) { return hookPhases.stream() .map(hookPhase -> buildPhase(hookPhase, context)) .map(HookPhase::fromString) .collect(Collectors.toList()); } }
HooksPhaseBuilder { public List<HookPhase> buildHookPhases(List<HookPhase> hookPhases, ProcessContext context) { return hookPhases.stream() .map(hookPhase -> buildPhase(hookPhase, context)) .map(HookPhase::fromString) .collect(Collectors.toList()); } @Inject HooksPhaseBuilder(ProcessTypeParser processTypeParser); }
HooksPhaseBuilder { public List<HookPhase> buildHookPhases(List<HookPhase> hookPhases, ProcessContext context) { return hookPhases.stream() .map(hookPhase -> buildPhase(hookPhase, context)) .map(HookPhase::fromString) .collect(Collectors.toList()); } @Inject HooksPhaseBuilder(ProcessTypeParser processTypeParser); List...
HooksPhaseBuilder { public List<HookPhase> buildHookPhases(List<HookPhase> hookPhases, ProcessContext context) { return hookPhases.stream() .map(hookPhase -> buildPhase(hookPhase, context)) .map(HookPhase::fromString) .collect(Collectors.toList()); } @Inject HooksPhaseBuilder(ProcessTypeParser processTypeParser); List...
@Test void testBuildHookPhaseForBlueGreenProcessWithPhaseAfterResume() { Mockito.when(processTypeParser.getProcessType(context.getExecution())) .thenReturn(ProcessType.BLUE_GREEN_DEPLOY); context.setVariable(Variables.PHASE, Phase.AFTER_RESUME); HooksPhaseBuilder hooksPhaseBuilder = new HooksPhaseBuilder(processTypePar...
public List<HookPhase> buildHookPhases(List<HookPhase> hookPhases, ProcessContext context) { return hookPhases.stream() .map(hookPhase -> buildPhase(hookPhase, context)) .map(HookPhase::fromString) .collect(Collectors.toList()); }
HooksPhaseBuilder { public List<HookPhase> buildHookPhases(List<HookPhase> hookPhases, ProcessContext context) { return hookPhases.stream() .map(hookPhase -> buildPhase(hookPhase, context)) .map(HookPhase::fromString) .collect(Collectors.toList()); } }
HooksPhaseBuilder { public List<HookPhase> buildHookPhases(List<HookPhase> hookPhases, ProcessContext context) { return hookPhases.stream() .map(hookPhase -> buildPhase(hookPhase, context)) .map(HookPhase::fromString) .collect(Collectors.toList()); } @Inject HooksPhaseBuilder(ProcessTypeParser processTypeParser); }
HooksPhaseBuilder { public List<HookPhase> buildHookPhases(List<HookPhase> hookPhases, ProcessContext context) { return hookPhases.stream() .map(hookPhase -> buildPhase(hookPhase, context)) .map(HookPhase::fromString) .collect(Collectors.toList()); } @Inject HooksPhaseBuilder(ProcessTypeParser processTypeParser); List...
HooksPhaseBuilder { public List<HookPhase> buildHookPhases(List<HookPhase> hookPhases, ProcessContext context) { return hookPhases.stream() .map(hookPhase -> buildPhase(hookPhase, context)) .map(HookPhase::fromString) .collect(Collectors.toList()); } @Inject HooksPhaseBuilder(ProcessTypeParser processTypeParser); List...
@Test void testCreateArchiveFromPartsFileStorageExceptionThrown() throws FileStorageException { Mockito.doThrow(FileStorageException.class) .when(fileService) .consumeFileContent(any(), any(), any()); Assertions.assertThrows(SLException.class, () -> archiveMerger.createArchiveFromParts(createFileEntriesFromFile(FILE_EN...
public Path createArchiveFromParts(List<FileEntry> archiveParts) { List<FileEntry> sortedArchiveParts = sort(archiveParts); String archiveName = getArchiveName(sortedArchiveParts.get(0)); try (FilePartsMerger filePartsMerger = new FilePartsMerger(archiveName)) { mergeArchiveParts(sortedArchiveParts, filePartsMerger); r...
ArchiveMerger { public Path createArchiveFromParts(List<FileEntry> archiveParts) { List<FileEntry> sortedArchiveParts = sort(archiveParts); String archiveName = getArchiveName(sortedArchiveParts.get(0)); try (FilePartsMerger filePartsMerger = new FilePartsMerger(archiveName)) { mergeArchiveParts(sortedArchiveParts, fil...
ArchiveMerger { public Path createArchiveFromParts(List<FileEntry> archiveParts) { List<FileEntry> sortedArchiveParts = sort(archiveParts); String archiveName = getArchiveName(sortedArchiveParts.get(0)); try (FilePartsMerger filePartsMerger = new FilePartsMerger(archiveName)) { mergeArchiveParts(sortedArchiveParts, fil...
ArchiveMerger { public Path createArchiveFromParts(List<FileEntry> archiveParts) { List<FileEntry> sortedArchiveParts = sort(archiveParts); String archiveName = getArchiveName(sortedArchiveParts.get(0)); try (FilePartsMerger filePartsMerger = new FilePartsMerger(archiveName)) { mergeArchiveParts(sortedArchiveParts, fil...
ArchiveMerger { public Path createArchiveFromParts(List<FileEntry> archiveParts) { List<FileEntry> sortedArchiveParts = sort(archiveParts); String archiveName = getArchiveName(sortedArchiveParts.get(0)); try (FilePartsMerger filePartsMerger = new FilePartsMerger(archiveName)) { mergeArchiveParts(sortedArchiveParts, fil...
@Test void testCreateArchiveFromParts() { List<FileEntry> fileEntries = createFileEntriesFromFile(FILE_ENTRIES); Path archiveFromParts = archiveMerger.createArchiveFromParts(fileEntries); Assertions.assertTrue(archiveFromParts.toString() .endsWith(getArchiveName(fileEntries.get(0)))); }
public Path createArchiveFromParts(List<FileEntry> archiveParts) { List<FileEntry> sortedArchiveParts = sort(archiveParts); String archiveName = getArchiveName(sortedArchiveParts.get(0)); try (FilePartsMerger filePartsMerger = new FilePartsMerger(archiveName)) { mergeArchiveParts(sortedArchiveParts, filePartsMerger); r...
ArchiveMerger { public Path createArchiveFromParts(List<FileEntry> archiveParts) { List<FileEntry> sortedArchiveParts = sort(archiveParts); String archiveName = getArchiveName(sortedArchiveParts.get(0)); try (FilePartsMerger filePartsMerger = new FilePartsMerger(archiveName)) { mergeArchiveParts(sortedArchiveParts, fil...
ArchiveMerger { public Path createArchiveFromParts(List<FileEntry> archiveParts) { List<FileEntry> sortedArchiveParts = sort(archiveParts); String archiveName = getArchiveName(sortedArchiveParts.get(0)); try (FilePartsMerger filePartsMerger = new FilePartsMerger(archiveName)) { mergeArchiveParts(sortedArchiveParts, fil...
ArchiveMerger { public Path createArchiveFromParts(List<FileEntry> archiveParts) { List<FileEntry> sortedArchiveParts = sort(archiveParts); String archiveName = getArchiveName(sortedArchiveParts.get(0)); try (FilePartsMerger filePartsMerger = new FilePartsMerger(archiveName)) { mergeArchiveParts(sortedArchiveParts, fil...
ArchiveMerger { public Path createArchiveFromParts(List<FileEntry> archiveParts) { List<FileEntry> sortedArchiveParts = sort(archiveParts); String archiveName = getArchiveName(sortedArchiveParts.get(0)); try (FilePartsMerger filePartsMerger = new FilePartsMerger(archiveName)) { mergeArchiveParts(sortedArchiveParts, fil...
@Test void closeQuietlyStatement() throws SQLException { Statement statement = Mockito.mock(Statement.class); JdbcUtil.closeQuietly(statement); Mockito.verify(statement) .close(); }
public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } }
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } }
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } private Jdbc...
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } private Jdbc...
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } private Jdbc...
@Test void testSortFileEntries() { List<FileEntry> randomSortedFileEntries = createFileEntriesFromFile(RANDOM_SORTED_ENTRIES); List<FileEntry> expectedFileEntries = createFileEntriesFromFile(EXPECTED_FILE_ENTRIES); List<FileEntry> sortedFileEntries = archiveMerger.sort(randomSortedFileEntries); Assertions.assertIterabl...
List<FileEntry> sort(List<FileEntry> archiveParts) { return archiveParts.stream() .sorted(Comparator.comparingInt(this::getArchivePartIndex)) .collect(Collectors.toList()); }
ArchiveMerger { List<FileEntry> sort(List<FileEntry> archiveParts) { return archiveParts.stream() .sorted(Comparator.comparingInt(this::getArchivePartIndex)) .collect(Collectors.toList()); } }
ArchiveMerger { List<FileEntry> sort(List<FileEntry> archiveParts) { return archiveParts.stream() .sorted(Comparator.comparingInt(this::getArchivePartIndex)) .collect(Collectors.toList()); } ArchiveMerger(FileService fileService, StepLogger stepLogger, DelegateExecution execution); }
ArchiveMerger { List<FileEntry> sort(List<FileEntry> archiveParts) { return archiveParts.stream() .sorted(Comparator.comparingInt(this::getArchivePartIndex)) .collect(Collectors.toList()); } ArchiveMerger(FileService fileService, StepLogger stepLogger, DelegateExecution execution); Path createArchiveFromParts(List<File...
ArchiveMerger { List<FileEntry> sort(List<FileEntry> archiveParts) { return archiveParts.stream() .sorted(Comparator.comparingInt(this::getArchivePartIndex)) .collect(Collectors.toList()); } ArchiveMerger(FileService fileService, StepLogger stepLogger, DelegateExecution execution); Path createArchiveFromParts(List<File...
@Test void testSortFileEntriesWithInvalidNames() { List<FileEntry> invalidFileEntries = createFileEntriesFromFile(FILE_ENTRIES_WITH_INVALID_NAMES); Assertions.assertThrows(SLException.class, () -> archiveMerger.sort(invalidFileEntries)); }
List<FileEntry> sort(List<FileEntry> archiveParts) { return archiveParts.stream() .sorted(Comparator.comparingInt(this::getArchivePartIndex)) .collect(Collectors.toList()); }
ArchiveMerger { List<FileEntry> sort(List<FileEntry> archiveParts) { return archiveParts.stream() .sorted(Comparator.comparingInt(this::getArchivePartIndex)) .collect(Collectors.toList()); } }
ArchiveMerger { List<FileEntry> sort(List<FileEntry> archiveParts) { return archiveParts.stream() .sorted(Comparator.comparingInt(this::getArchivePartIndex)) .collect(Collectors.toList()); } ArchiveMerger(FileService fileService, StepLogger stepLogger, DelegateExecution execution); }
ArchiveMerger { List<FileEntry> sort(List<FileEntry> archiveParts) { return archiveParts.stream() .sorted(Comparator.comparingInt(this::getArchivePartIndex)) .collect(Collectors.toList()); } ArchiveMerger(FileService fileService, StepLogger stepLogger, DelegateExecution execution); Path createArchiveFromParts(List<File...
ArchiveMerger { List<FileEntry> sort(List<FileEntry> archiveParts) { return archiveParts.stream() .sorted(Comparator.comparingInt(this::getArchivePartIndex)) .collect(Collectors.toList()); } ArchiveMerger(FileService fileService, StepLogger stepLogger, DelegateExecution execution); Path createArchiveFromParts(List<File...
@Test void testSortFileEntriesWithNamesWhichContainPartButDoNotContainIndexes() { List<FileEntry> invalidFileEntries = createFileEntriesFromFile(FILE_ENTRIES_WITHOUT_INDEXES); Assertions.assertThrows(SLException.class, () -> archiveMerger.sort(invalidFileEntries)); }
List<FileEntry> sort(List<FileEntry> archiveParts) { return archiveParts.stream() .sorted(Comparator.comparingInt(this::getArchivePartIndex)) .collect(Collectors.toList()); }
ArchiveMerger { List<FileEntry> sort(List<FileEntry> archiveParts) { return archiveParts.stream() .sorted(Comparator.comparingInt(this::getArchivePartIndex)) .collect(Collectors.toList()); } }
ArchiveMerger { List<FileEntry> sort(List<FileEntry> archiveParts) { return archiveParts.stream() .sorted(Comparator.comparingInt(this::getArchivePartIndex)) .collect(Collectors.toList()); } ArchiveMerger(FileService fileService, StepLogger stepLogger, DelegateExecution execution); }
ArchiveMerger { List<FileEntry> sort(List<FileEntry> archiveParts) { return archiveParts.stream() .sorted(Comparator.comparingInt(this::getArchivePartIndex)) .collect(Collectors.toList()); } ArchiveMerger(FileService fileService, StepLogger stepLogger, DelegateExecution execution); Path createArchiveFromParts(List<File...
ArchiveMerger { List<FileEntry> sort(List<FileEntry> archiveParts) { return archiveParts.stream() .sorted(Comparator.comparingInt(this::getArchivePartIndex)) .collect(Collectors.toList()); } ArchiveMerger(FileService fileService, StepLogger stepLogger, DelegateExecution execution); Path createArchiveFromParts(List<File...
@Test void testWithArchiveNameWithoutParts() throws FileStorageException { List<FileEntry> fileEntryWithoutParts = createFileEntriesFromFile(FILE_ENTRY_WITHOUT_PARTS); archiveMerger.createArchiveFromParts(fileEntryWithoutParts); Mockito.verify(fileService) .consumeFileContent(any(), any(), any()); }
public Path createArchiveFromParts(List<FileEntry> archiveParts) { List<FileEntry> sortedArchiveParts = sort(archiveParts); String archiveName = getArchiveName(sortedArchiveParts.get(0)); try (FilePartsMerger filePartsMerger = new FilePartsMerger(archiveName)) { mergeArchiveParts(sortedArchiveParts, filePartsMerger); r...
ArchiveMerger { public Path createArchiveFromParts(List<FileEntry> archiveParts) { List<FileEntry> sortedArchiveParts = sort(archiveParts); String archiveName = getArchiveName(sortedArchiveParts.get(0)); try (FilePartsMerger filePartsMerger = new FilePartsMerger(archiveName)) { mergeArchiveParts(sortedArchiveParts, fil...
ArchiveMerger { public Path createArchiveFromParts(List<FileEntry> archiveParts) { List<FileEntry> sortedArchiveParts = sort(archiveParts); String archiveName = getArchiveName(sortedArchiveParts.get(0)); try (FilePartsMerger filePartsMerger = new FilePartsMerger(archiveName)) { mergeArchiveParts(sortedArchiveParts, fil...
ArchiveMerger { public Path createArchiveFromParts(List<FileEntry> archiveParts) { List<FileEntry> sortedArchiveParts = sort(archiveParts); String archiveName = getArchiveName(sortedArchiveParts.get(0)); try (FilePartsMerger filePartsMerger = new FilePartsMerger(archiveName)) { mergeArchiveParts(sortedArchiveParts, fil...
ArchiveMerger { public Path createArchiveFromParts(List<FileEntry> archiveParts) { List<FileEntry> sortedArchiveParts = sort(archiveParts); String archiveName = getArchiveName(sortedArchiveParts.get(0)); try (FilePartsMerger filePartsMerger = new FilePartsMerger(archiveName)) { mergeArchiveParts(sortedArchiveParts, fil...
@Test void testBadAbsolutePathRead() { String mtar = SAMPLE_MTAR_WITH_JAR_ENTRY_ABSOLUTE_PATH; String fileName = "/web/"; String expectedException = MessageFormat.format(FileUtils.PATH_SHOULD_NOT_BE_ABSOLUTE, "/web/"); long maxFileUploadSize = MAX_UPLOAD_FILE_SIZE; ApplicationArchiveContext applicationArchiveContext = ...
public String calculateApplicationDigest(ApplicationArchiveContext applicationArchiveContext) { try { iterateApplicationArchive(applicationArchiveContext); return applicationArchiveContext.getApplicationDigestCalculator() .getDigest(); } catch (IOException e) { throw new SLException(e, Messages.ERROR_RETRIEVING_MTA_MOD...
ApplicationArchiveReader { public String calculateApplicationDigest(ApplicationArchiveContext applicationArchiveContext) { try { iterateApplicationArchive(applicationArchiveContext); return applicationArchiveContext.getApplicationDigestCalculator() .getDigest(); } catch (IOException e) { throw new SLException(e, Messag...
ApplicationArchiveReader { public String calculateApplicationDigest(ApplicationArchiveContext applicationArchiveContext) { try { iterateApplicationArchive(applicationArchiveContext); return applicationArchiveContext.getApplicationDigestCalculator() .getDigest(); } catch (IOException e) { throw new SLException(e, Messag...
ApplicationArchiveReader { public String calculateApplicationDigest(ApplicationArchiveContext applicationArchiveContext) { try { iterateApplicationArchive(applicationArchiveContext); return applicationArchiveContext.getApplicationDigestCalculator() .getDigest(); } catch (IOException e) { throw new SLException(e, Messag...
ApplicationArchiveReader { public String calculateApplicationDigest(ApplicationArchiveContext applicationArchiveContext) { try { iterateApplicationArchive(applicationArchiveContext); return applicationArchiveContext.getApplicationDigestCalculator() .getDigest(); } catch (IOException e) { throw new SLException(e, Messag...
@Test void testGetProcessDefinitionKey() { Operation mockedOperation = createMockedOperation(PROCESS_ID, ProcessType.DEPLOY, Operation.State.RUNNING); Mockito.when(metadataMapper.getDiagramId(ProcessType.DEPLOY)) .thenReturn(Constants.DEPLOY_SERVICE_ID); String processDefinitionKey = operationsHelper.getProcessDefiniti...
public String getProcessDefinitionKey(Operation operation) { return metadataMapper.getDiagramId(operation.getProcessType()); }
OperationsHelper { public String getProcessDefinitionKey(Operation operation) { return metadataMapper.getDiagramId(operation.getProcessType()); } }
OperationsHelper { public String getProcessDefinitionKey(Operation operation) { return metadataMapper.getDiagramId(operation.getProcessType()); } @Inject OperationsHelper(OperationService operationService, ProcessTypeToOperationMetadataMapper metadataMapper, ProcessHelper processHelper); }
OperationsHelper { public String getProcessDefinitionKey(Operation operation) { return metadataMapper.getDiagramId(operation.getProcessType()); } @Inject OperationsHelper(OperationService operationService, ProcessTypeToOperationMetadataMapper metadataMapper, ProcessHelper processHelper); St...
OperationsHelper { public String getProcessDefinitionKey(Operation operation) { return metadataMapper.getDiagramId(operation.getProcessType()); } @Inject OperationsHelper(OperationService operationService, ProcessTypeToOperationMetadataMapper metadataMapper, ProcessHelper processHelper); St...
@Test void testAddStateWhenOperationHasState() { Operation mockedOperation = createMockedOperation(PROCESS_ID, ProcessType.DEPLOY, Operation.State.RUNNING); Operation operation = operationsHelper.addState(mockedOperation); Assertions.assertEquals(Operation.State.RUNNING, operation.getState()); }
public Operation addState(Operation operation) { if (operation.getState() != null) { return operation; } Operation.State state = computeState(operation); if (operation.hasAcquiredLock() && (state.equals(Operation.State.ABORTED) || state.equals(Operation.State.FINISHED))) { operation = ImmutableOperation.builder() .from...
OperationsHelper { public Operation addState(Operation operation) { if (operation.getState() != null) { return operation; } Operation.State state = computeState(operation); if (operation.hasAcquiredLock() && (state.equals(Operation.State.ABORTED) || state.equals(Operation.State.FINISHED))) { operation = ImmutableOperat...
OperationsHelper { public Operation addState(Operation operation) { if (operation.getState() != null) { return operation; } Operation.State state = computeState(operation); if (operation.hasAcquiredLock() && (state.equals(Operation.State.ABORTED) || state.equals(Operation.State.FINISHED))) { operation = ImmutableOperat...
OperationsHelper { public Operation addState(Operation operation) { if (operation.getState() != null) { return operation; } Operation.State state = computeState(operation); if (operation.hasAcquiredLock() && (state.equals(Operation.State.ABORTED) || state.equals(Operation.State.FINISHED))) { operation = ImmutableOperat...
OperationsHelper { public Operation addState(Operation operation) { if (operation.getState() != null) { return operation; } Operation.State state = computeState(operation); if (operation.hasAcquiredLock() && (state.equals(Operation.State.ABORTED) || state.equals(Operation.State.FINISHED))) { operation = ImmutableOperat...
@Test void testComputeOperationStateWhenProcessIsInNonFinalStateAndProcessIsAborted() { Mockito.when(processHelper.computeProcessState(PROCESS_ID)) .thenReturn(State.ABORTED); Operation.State state = operationsHelper.computeProcessState(PROCESS_ID); Assertions.assertEquals(Operation.State.ABORTED, state); }
public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); }
OperationsHelper { public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); } }
OperationsHelper { public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); } @Inject OperationsHelper(OperationService operationService, ProcessTypeToOperationMetadataMapper metadataMapper, ProcessHelper processHelper); }
OperationsHelper { public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); } @Inject OperationsHelper(OperationService operationService, ProcessTypeToOperationMetadataMapper metadataMapper, ProcessHelper processHelper); String getP...
OperationsHelper { public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); } @Inject OperationsHelper(OperationService operationService, ProcessTypeToOperationMetadataMapper metadataMapper, ProcessHelper processHelper); String getP...
@Test void testComputeOperationStateWhenProcessIsInNonFinalStateAndProcessIsAtReceiveTask() { Mockito.when(processHelper.computeProcessState(PROCESS_ID)) .thenReturn(State.ACTION_REQUIRED); Operation.State state = operationsHelper.computeProcessState(PROCESS_ID); Assertions.assertEquals(Operation.State.ACTION_REQUIRED,...
public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); }
OperationsHelper { public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); } }
OperationsHelper { public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); } @Inject OperationsHelper(OperationService operationService, ProcessTypeToOperationMetadataMapper metadataMapper, ProcessHelper processHelper); }
OperationsHelper { public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); } @Inject OperationsHelper(OperationService operationService, ProcessTypeToOperationMetadataMapper metadataMapper, ProcessHelper processHelper); String getP...
OperationsHelper { public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); } @Inject OperationsHelper(OperationService operationService, ProcessTypeToOperationMetadataMapper metadataMapper, ProcessHelper processHelper); String getP...
@Test void testComputeOperationStateWhenProcessIsInNonFinalStateAndProcessIsInErrorState() { Mockito.when(processHelper.computeProcessState(PROCESS_ID)) .thenReturn(State.ERROR); Operation.State state = operationsHelper.computeProcessState(PROCESS_ID); Assertions.assertEquals(Operation.State.ERROR, state); }
public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); }
OperationsHelper { public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); } }
OperationsHelper { public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); } @Inject OperationsHelper(OperationService operationService, ProcessTypeToOperationMetadataMapper metadataMapper, ProcessHelper processHelper); }
OperationsHelper { public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); } @Inject OperationsHelper(OperationService operationService, ProcessTypeToOperationMetadataMapper metadataMapper, ProcessHelper processHelper); String getP...
OperationsHelper { public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); } @Inject OperationsHelper(OperationService operationService, ProcessTypeToOperationMetadataMapper metadataMapper, ProcessHelper processHelper); String getP...
@Test void closeQuietlyStatementWithException() throws SQLException { Statement statement = Mockito.mock(Statement.class); Mockito.doThrow(new SQLException()) .when(statement) .close(); JdbcUtil.closeQuietly(statement); Mockito.verify(statement) .close(); }
public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } }
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } }
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } private Jdbc...
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } private Jdbc...
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } private Jdbc...
@Test void testComputeOperationStateWhenProcessIsInNonFinalStateAndProcessIsRunning() { Mockito.when(processHelper.computeProcessState(PROCESS_ID)) .thenReturn(State.RUNNING); Operation.State state = operationsHelper.computeProcessState(PROCESS_ID); Assertions.assertEquals(Operation.State.RUNNING, state); }
public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); }
OperationsHelper { public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); } }
OperationsHelper { public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); } @Inject OperationsHelper(OperationService operationService, ProcessTypeToOperationMetadataMapper metadataMapper, ProcessHelper processHelper); }
OperationsHelper { public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); } @Inject OperationsHelper(OperationService operationService, ProcessTypeToOperationMetadataMapper metadataMapper, ProcessHelper processHelper); String getP...
OperationsHelper { public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); } @Inject OperationsHelper(OperationService operationService, ProcessTypeToOperationMetadataMapper metadataMapper, ProcessHelper processHelper); String getP...
@Test void testComputeOperationStateWhenProcessIsInFinalStateAndProcessIsAborted() { Mockito.when(processHelper.computeProcessState(PROCESS_ID)) .thenReturn(State.ABORTED); Operation.State state = operationsHelper.computeProcessState(PROCESS_ID); Assertions.assertEquals(Operation.State.ABORTED, state); }
public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); }
OperationsHelper { public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); } }
OperationsHelper { public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); } @Inject OperationsHelper(OperationService operationService, ProcessTypeToOperationMetadataMapper metadataMapper, ProcessHelper processHelper); }
OperationsHelper { public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); } @Inject OperationsHelper(OperationService operationService, ProcessTypeToOperationMetadataMapper metadataMapper, ProcessHelper processHelper); String getP...
OperationsHelper { public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); } @Inject OperationsHelper(OperationService operationService, ProcessTypeToOperationMetadataMapper metadataMapper, ProcessHelper processHelper); String getP...
@Test void testComputeOperationStateWhenProcessIsInFinalStateAndProcessIsNotAborted() { Mockito.when(processHelper.computeProcessState(PROCESS_ID)) .thenReturn(State.FINISHED); Operation.State state = operationsHelper.computeProcessState(PROCESS_ID); Assertions.assertEquals(Operation.State.FINISHED, state); }
public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); }
OperationsHelper { public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); } }
OperationsHelper { public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); } @Inject OperationsHelper(OperationService operationService, ProcessTypeToOperationMetadataMapper metadataMapper, ProcessHelper processHelper); }
OperationsHelper { public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); } @Inject OperationsHelper(OperationService operationService, ProcessTypeToOperationMetadataMapper metadataMapper, ProcessHelper processHelper); String getP...
OperationsHelper { public Operation.State computeProcessState(String processId) { return processHelper.computeProcessState(processId); } @Inject OperationsHelper(OperationService operationService, ProcessTypeToOperationMetadataMapper metadataMapper, ProcessHelper processHelper); String getP...
@Test void testFindOperationsWithStatusRunning() { List<Operation> operations = List.of(createMockedOperation("12af8e1e-4d96-11ea-b77f-2e728ce88178", ProcessType.DEPLOY, Operation.State.RUNNING), createMockedOperation("13af8e1e-4d96-11ea-b77f-2e728ce88178", ProcessType.DEPLOY, Operation.State.ABORTED)); List<Operation....
public List<Operation> findOperations(List<Operation> operations, List<Operation.State> statusList) { operations = addState(operations); return filterBasedOnStates(operations, statusList); }
OperationsHelper { public List<Operation> findOperations(List<Operation> operations, List<Operation.State> statusList) { operations = addState(operations); return filterBasedOnStates(operations, statusList); } }
OperationsHelper { public List<Operation> findOperations(List<Operation> operations, List<Operation.State> statusList) { operations = addState(operations); return filterBasedOnStates(operations, statusList); } @Inject OperationsHelper(OperationService operationService, ProcessTypeToOperationMetadataMapper metadataMapp...
OperationsHelper { public List<Operation> findOperations(List<Operation> operations, List<Operation.State> statusList) { operations = addState(operations); return filterBasedOnStates(operations, statusList); } @Inject OperationsHelper(OperationService operationService, ProcessTypeToOperationMetadataMapper metadataMapp...
OperationsHelper { public List<Operation> findOperations(List<Operation> operations, List<Operation.State> statusList) { operations = addState(operations); return filterBasedOnStates(operations, statusList); } @Inject OperationsHelper(OperationService operationService, ProcessTypeToOperationMetadataMapper metadataMapp...
@Test void testFundOperationsWithoutStatus() { List<Operation> operations = List.of(createMockedOperation("12af8e1e-4d96-11ea-b77f-2e728ce88178", ProcessType.DEPLOY, Operation.State.RUNNING), createMockedOperation("13af8e1e-4d96-11ea-b77f-2e728ce88178", ProcessType.DEPLOY, Operation.State.ABORTED)); List<Operation> fou...
public List<Operation> findOperations(List<Operation> operations, List<Operation.State> statusList) { operations = addState(operations); return filterBasedOnStates(operations, statusList); }
OperationsHelper { public List<Operation> findOperations(List<Operation> operations, List<Operation.State> statusList) { operations = addState(operations); return filterBasedOnStates(operations, statusList); } }
OperationsHelper { public List<Operation> findOperations(List<Operation> operations, List<Operation.State> statusList) { operations = addState(operations); return filterBasedOnStates(operations, statusList); } @Inject OperationsHelper(OperationService operationService, ProcessTypeToOperationMetadataMapper metadataMapp...
OperationsHelper { public List<Operation> findOperations(List<Operation> operations, List<Operation.State> statusList) { operations = addState(operations); return filterBasedOnStates(operations, statusList); } @Inject OperationsHelper(OperationService operationService, ProcessTypeToOperationMetadataMapper metadataMapp...
OperationsHelper { public List<Operation> findOperations(List<Operation> operations, List<Operation.State> statusList) { operations = addState(operations); return filterBasedOnStates(operations, statusList); } @Inject OperationsHelper(OperationService operationService, ProcessTypeToOperationMetadataMapper metadataMapp...
@Test void testIsApplicationStagedCorrectlyMetadataIsNull() { CloudApplication app = createApplication(); Mockito.when(client.getBuildsForApplication(any(UUID.class))) .thenReturn(List.of(Mockito.mock(CloudBuild.class))); Assertions.assertFalse(applicationStager.isApplicationStagedCorrectly(app)); }
public boolean isApplicationStagedCorrectly(CloudApplication app) { List<CloudBuild> buildsForApplication = client.getBuildsForApplication(app.getMetadata() .getGuid()); if (containsNullMetadata(buildsForApplication)) { return false; } CloudBuild build = getLastBuild(buildsForApplication); if (build == null) { logger.d...
ApplicationStager { public boolean isApplicationStagedCorrectly(CloudApplication app) { List<CloudBuild> buildsForApplication = client.getBuildsForApplication(app.getMetadata() .getGuid()); if (containsNullMetadata(buildsForApplication)) { return false; } CloudBuild build = getLastBuild(buildsForApplication); if (build...
ApplicationStager { public boolean isApplicationStagedCorrectly(CloudApplication app) { List<CloudBuild> buildsForApplication = client.getBuildsForApplication(app.getMetadata() .getGuid()); if (containsNullMetadata(buildsForApplication)) { return false; } CloudBuild build = getLastBuild(buildsForApplication); if (build...
ApplicationStager { public boolean isApplicationStagedCorrectly(CloudApplication app) { List<CloudBuild> buildsForApplication = client.getBuildsForApplication(app.getMetadata() .getGuid()); if (containsNullMetadata(buildsForApplication)) { return false; } CloudBuild build = getLastBuild(buildsForApplication); if (build...
ApplicationStager { public boolean isApplicationStagedCorrectly(CloudApplication app) { List<CloudBuild> buildsForApplication = client.getBuildsForApplication(app.getMetadata() .getGuid()); if (containsNullMetadata(buildsForApplication)) { return false; } CloudBuild build = getLastBuild(buildsForApplication); if (build...
@Test void testIsApplicationStagedCorrectlyNoLastBuild() { CloudApplication app = createApplication(); Mockito.when(client.getBuildsForApplication(any(UUID.class))) .thenReturn(Collections.emptyList()); Assertions.assertFalse(applicationStager.isApplicationStagedCorrectly(app)); }
public boolean isApplicationStagedCorrectly(CloudApplication app) { List<CloudBuild> buildsForApplication = client.getBuildsForApplication(app.getMetadata() .getGuid()); if (containsNullMetadata(buildsForApplication)) { return false; } CloudBuild build = getLastBuild(buildsForApplication); if (build == null) { logger.d...
ApplicationStager { public boolean isApplicationStagedCorrectly(CloudApplication app) { List<CloudBuild> buildsForApplication = client.getBuildsForApplication(app.getMetadata() .getGuid()); if (containsNullMetadata(buildsForApplication)) { return false; } CloudBuild build = getLastBuild(buildsForApplication); if (build...
ApplicationStager { public boolean isApplicationStagedCorrectly(CloudApplication app) { List<CloudBuild> buildsForApplication = client.getBuildsForApplication(app.getMetadata() .getGuid()); if (containsNullMetadata(buildsForApplication)) { return false; } CloudBuild build = getLastBuild(buildsForApplication); if (build...
ApplicationStager { public boolean isApplicationStagedCorrectly(CloudApplication app) { List<CloudBuild> buildsForApplication = client.getBuildsForApplication(app.getMetadata() .getGuid()); if (containsNullMetadata(buildsForApplication)) { return false; } CloudBuild build = getLastBuild(buildsForApplication); if (build...
ApplicationStager { public boolean isApplicationStagedCorrectly(CloudApplication app) { List<CloudBuild> buildsForApplication = client.getBuildsForApplication(app.getMetadata() .getGuid()); if (containsNullMetadata(buildsForApplication)) { return false; } CloudBuild build = getLastBuild(buildsForApplication); if (build...
@Test void testStageAppIfThereIsNoCloudPacakge() { context.setVariable(Variables.CLOUD_PACKAGE, null); assertEquals(StepPhase.DONE, applicationStager.stageApp(null)); }
public StepPhase stageApp(CloudApplication app) { CloudPackage cloudPackage = context.getVariable(Variables.CLOUD_PACKAGE); if (cloudPackage == null) { return StepPhase.DONE; } logger.info(Messages.STAGING_APP, app.getName()); return createBuild(cloudPackage.getGuid()); }
ApplicationStager { public StepPhase stageApp(CloudApplication app) { CloudPackage cloudPackage = context.getVariable(Variables.CLOUD_PACKAGE); if (cloudPackage == null) { return StepPhase.DONE; } logger.info(Messages.STAGING_APP, app.getName()); return createBuild(cloudPackage.getGuid()); } }
ApplicationStager { public StepPhase stageApp(CloudApplication app) { CloudPackage cloudPackage = context.getVariable(Variables.CLOUD_PACKAGE); if (cloudPackage == null) { return StepPhase.DONE; } logger.info(Messages.STAGING_APP, app.getName()); return createBuild(cloudPackage.getGuid()); } ApplicationStager(ProcessCo...
ApplicationStager { public StepPhase stageApp(CloudApplication app) { CloudPackage cloudPackage = context.getVariable(Variables.CLOUD_PACKAGE); if (cloudPackage == null) { return StepPhase.DONE; } logger.info(Messages.STAGING_APP, app.getName()); return createBuild(cloudPackage.getGuid()); } ApplicationStager(ProcessCo...
ApplicationStager { public StepPhase stageApp(CloudApplication app) { CloudPackage cloudPackage = context.getVariable(Variables.CLOUD_PACKAGE); if (cloudPackage == null) { return StepPhase.DONE; } logger.info(Messages.STAGING_APP, app.getName()); return createBuild(cloudPackage.getGuid()); } ApplicationStager(ProcessCo...
@Test void testIfBuildGuidDoesNotExist() { StagingState stagingState = applicationStager.getStagingState(); assertEquals(PackageState.STAGED, stagingState.getState()); assertNull(stagingState.getError()); }
public StagingState getStagingState() { UUID buildGuid = context.getVariable(Variables.BUILD_GUID); if (buildGuid == null) { return ImmutableStagingState.builder() .state(PackageState.STAGED) .build(); } CloudBuild build = getBuild(buildGuid); return getStagingState(build); }
ApplicationStager { public StagingState getStagingState() { UUID buildGuid = context.getVariable(Variables.BUILD_GUID); if (buildGuid == null) { return ImmutableStagingState.builder() .state(PackageState.STAGED) .build(); } CloudBuild build = getBuild(buildGuid); return getStagingState(build); } }
ApplicationStager { public StagingState getStagingState() { UUID buildGuid = context.getVariable(Variables.BUILD_GUID); if (buildGuid == null) { return ImmutableStagingState.builder() .state(PackageState.STAGED) .build(); } CloudBuild build = getBuild(buildGuid); return getStagingState(build); } ApplicationStager(Proce...
ApplicationStager { public StagingState getStagingState() { UUID buildGuid = context.getVariable(Variables.BUILD_GUID); if (buildGuid == null) { return ImmutableStagingState.builder() .state(PackageState.STAGED) .build(); } CloudBuild build = getBuild(buildGuid); return getStagingState(build); } ApplicationStager(Proce...
ApplicationStager { public StagingState getStagingState() { UUID buildGuid = context.getVariable(Variables.BUILD_GUID); if (buildGuid == null) { return ImmutableStagingState.builder() .state(PackageState.STAGED) .build(); } CloudBuild build = getBuild(buildGuid); return getStagingState(build); } ApplicationStager(Proce...
@Test void testProcessDuration() { mockProcessStartAndEndTime(5 * 500); ProcessTime processTime = processTimeCalculator.calculate(PROCESS_ID); assertEquals(5 * 500, processTime.getProcessDuration()); }
public ProcessTime calculate(String processInstanceId) { HistoricProcessInstance rootProcessInstance = flowableFacade.getHistoricProcessById(processInstanceId); List<HistoricActivityInstance> processActivities = flowableFacade.getProcessEngine() .getHistoryService() .createHistoricActivityInstanceQuery() .processInstan...
ProcessTimeCalculator { public ProcessTime calculate(String processInstanceId) { HistoricProcessInstance rootProcessInstance = flowableFacade.getHistoricProcessById(processInstanceId); List<HistoricActivityInstance> processActivities = flowableFacade.getProcessEngine() .getHistoryService() .createHistoricActivityInstan...
ProcessTimeCalculator { public ProcessTime calculate(String processInstanceId) { HistoricProcessInstance rootProcessInstance = flowableFacade.getHistoricProcessById(processInstanceId); List<HistoricActivityInstance> processActivities = flowableFacade.getProcessEngine() .getHistoryService() .createHistoricActivityInstan...
ProcessTimeCalculator { public ProcessTime calculate(String processInstanceId) { HistoricProcessInstance rootProcessInstance = flowableFacade.getHistoricProcessById(processInstanceId); List<HistoricActivityInstance> processActivities = flowableFacade.getProcessEngine() .getHistoryService() .createHistoricActivityInstan...
ProcessTimeCalculator { public ProcessTime calculate(String processInstanceId) { HistoricProcessInstance rootProcessInstance = flowableFacade.getHistoricProcessById(processInstanceId); List<HistoricActivityInstance> processActivities = flowableFacade.getProcessEngine() .getHistoryService() .createHistoricActivityInstan...
@Test void closeQuietlyStatementWithNull() { Statement statement = null; Assertions.assertDoesNotThrow(() -> JdbcUtil.closeQuietly(statement)); }
public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } }
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } }
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } private Jdbc...
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } private Jdbc...
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } private Jdbc...
@Test void testAbortedProcessDuration() { long currentTime = mockProcessStartTime(); processTimeCalculator = new ProcessTimeCalculator(flowableFacade, () -> currentTime + 5 * 500); ProcessTime processTime = processTimeCalculator.calculate(PROCESS_ID); assertEquals(5 * 500, processTime.getProcessDuration()); }
public ProcessTime calculate(String processInstanceId) { HistoricProcessInstance rootProcessInstance = flowableFacade.getHistoricProcessById(processInstanceId); List<HistoricActivityInstance> processActivities = flowableFacade.getProcessEngine() .getHistoryService() .createHistoricActivityInstanceQuery() .processInstan...
ProcessTimeCalculator { public ProcessTime calculate(String processInstanceId) { HistoricProcessInstance rootProcessInstance = flowableFacade.getHistoricProcessById(processInstanceId); List<HistoricActivityInstance> processActivities = flowableFacade.getProcessEngine() .getHistoryService() .createHistoricActivityInstan...
ProcessTimeCalculator { public ProcessTime calculate(String processInstanceId) { HistoricProcessInstance rootProcessInstance = flowableFacade.getHistoricProcessById(processInstanceId); List<HistoricActivityInstance> processActivities = flowableFacade.getProcessEngine() .getHistoryService() .createHistoricActivityInstan...
ProcessTimeCalculator { public ProcessTime calculate(String processInstanceId) { HistoricProcessInstance rootProcessInstance = flowableFacade.getHistoricProcessById(processInstanceId); List<HistoricActivityInstance> processActivities = flowableFacade.getProcessEngine() .getHistoryService() .createHistoricActivityInstan...
ProcessTimeCalculator { public ProcessTime calculate(String processInstanceId) { HistoricProcessInstance rootProcessInstance = flowableFacade.getHistoricProcessById(processInstanceId); List<HistoricActivityInstance> processActivities = flowableFacade.getProcessEngine() .getHistoryService() .createHistoricActivityInstan...
@Test void testDelayBetweenActivities() { mockProcessStartAndEndTime(100); long offset = currentTimeSupplier.getAsLong(); List<HistoricActivityInstance> activities = mockActivitiesWithDelay(offset, Activity.of("serviceTask", 6, 100), 10); Mockito.when(historicActivityInstanceQueryMock.list()) .thenReturn(activities); P...
public ProcessTime calculate(String processInstanceId) { HistoricProcessInstance rootProcessInstance = flowableFacade.getHistoricProcessById(processInstanceId); List<HistoricActivityInstance> processActivities = flowableFacade.getProcessEngine() .getHistoryService() .createHistoricActivityInstanceQuery() .processInstan...
ProcessTimeCalculator { public ProcessTime calculate(String processInstanceId) { HistoricProcessInstance rootProcessInstance = flowableFacade.getHistoricProcessById(processInstanceId); List<HistoricActivityInstance> processActivities = flowableFacade.getProcessEngine() .getHistoryService() .createHistoricActivityInstan...
ProcessTimeCalculator { public ProcessTime calculate(String processInstanceId) { HistoricProcessInstance rootProcessInstance = flowableFacade.getHistoricProcessById(processInstanceId); List<HistoricActivityInstance> processActivities = flowableFacade.getProcessEngine() .getHistoryService() .createHistoricActivityInstan...
ProcessTimeCalculator { public ProcessTime calculate(String processInstanceId) { HistoricProcessInstance rootProcessInstance = flowableFacade.getHistoricProcessById(processInstanceId); List<HistoricActivityInstance> processActivities = flowableFacade.getProcessEngine() .getHistoryService() .createHistoricActivityInstan...
ProcessTimeCalculator { public ProcessTime calculate(String processInstanceId) { HistoricProcessInstance rootProcessInstance = flowableFacade.getHistoricProcessById(processInstanceId); List<HistoricActivityInstance> processActivities = flowableFacade.getProcessEngine() .getHistoryService() .createHistoricActivityInstan...
@Test void testAbortedProcessDelayBetweenSteps() { long currentTime = mockProcessStartTime(); processTimeCalculator = new ProcessTimeCalculator(flowableFacade, () -> currentTime + 500); List<Activity> activities = List.of(Activity.of("serviceTask", 5, 500)); List<HistoricActivityInstance> processActivities = mockProces...
public ProcessTime calculate(String processInstanceId) { HistoricProcessInstance rootProcessInstance = flowableFacade.getHistoricProcessById(processInstanceId); List<HistoricActivityInstance> processActivities = flowableFacade.getProcessEngine() .getHistoryService() .createHistoricActivityInstanceQuery() .processInstan...
ProcessTimeCalculator { public ProcessTime calculate(String processInstanceId) { HistoricProcessInstance rootProcessInstance = flowableFacade.getHistoricProcessById(processInstanceId); List<HistoricActivityInstance> processActivities = flowableFacade.getProcessEngine() .getHistoryService() .createHistoricActivityInstan...
ProcessTimeCalculator { public ProcessTime calculate(String processInstanceId) { HistoricProcessInstance rootProcessInstance = flowableFacade.getHistoricProcessById(processInstanceId); List<HistoricActivityInstance> processActivities = flowableFacade.getProcessEngine() .getHistoryService() .createHistoricActivityInstan...
ProcessTimeCalculator { public ProcessTime calculate(String processInstanceId) { HistoricProcessInstance rootProcessInstance = flowableFacade.getHistoricProcessById(processInstanceId); List<HistoricActivityInstance> processActivities = flowableFacade.getProcessEngine() .getHistoryService() .createHistoricActivityInstan...
ProcessTimeCalculator { public ProcessTime calculate(String processInstanceId) { HistoricProcessInstance rootProcessInstance = flowableFacade.getHistoricProcessById(processInstanceId); List<HistoricActivityInstance> processActivities = flowableFacade.getProcessEngine() .getHistoryService() .createHistoricActivityInstan...
@Test void testOverallDelayBetweenSteps() { List<Activity> activities = List.of(Activity.of("intermediateCatchEvent", 5, 100), Activity.of("sequenceFlow", 3, 100), Activity.of("exclusiveGateway", 1, 1000), Activity.of("inclusiveGateway", 1, 1000), Activity.of("serviceTask", 5, 500)); long offset = currentTimeSupplier.g...
public ProcessTime calculate(String processInstanceId) { HistoricProcessInstance rootProcessInstance = flowableFacade.getHistoricProcessById(processInstanceId); List<HistoricActivityInstance> processActivities = flowableFacade.getProcessEngine() .getHistoryService() .createHistoricActivityInstanceQuery() .processInstan...
ProcessTimeCalculator { public ProcessTime calculate(String processInstanceId) { HistoricProcessInstance rootProcessInstance = flowableFacade.getHistoricProcessById(processInstanceId); List<HistoricActivityInstance> processActivities = flowableFacade.getProcessEngine() .getHistoryService() .createHistoricActivityInstan...
ProcessTimeCalculator { public ProcessTime calculate(String processInstanceId) { HistoricProcessInstance rootProcessInstance = flowableFacade.getHistoricProcessById(processInstanceId); List<HistoricActivityInstance> processActivities = flowableFacade.getProcessEngine() .getHistoryService() .createHistoricActivityInstan...
ProcessTimeCalculator { public ProcessTime calculate(String processInstanceId) { HistoricProcessInstance rootProcessInstance = flowableFacade.getHistoricProcessById(processInstanceId); List<HistoricActivityInstance> processActivities = flowableFacade.getProcessEngine() .getHistoryService() .createHistoricActivityInstan...
ProcessTimeCalculator { public ProcessTime calculate(String processInstanceId) { HistoricProcessInstance rootProcessInstance = flowableFacade.getHistoricProcessById(processInstanceId); List<HistoricActivityInstance> processActivities = flowableFacade.getProcessEngine() .getHistoryService() .createHistoricActivityInstan...
@Test void testAggregateHooksNoCurrentAndNoHooksForExecution() { Module moduleToDeploy = createModule("test-module", List.of()); Mockito.when(processTypeParser.getProcessType(context.getExecution())) .thenReturn(ProcessType.DEPLOY); ModuleHooksAggregator moduleHooksAggregator = createModuleHooksAggregator(moduleToDeplo...
public List<Hook> aggregateHooks(List<HookPhase> currentHookPhasesForExecution) { Map<String, List<String>> alreadyExecutedHooksForModule = getAlreadyExecutedHooks(); List<Hook> hooksCalculatedForExecution = determineHooksForExecution(alreadyExecutedHooksForModule, currentHookPhasesForExecution); updateExecutedHooksFor...
ModuleHooksAggregator { public List<Hook> aggregateHooks(List<HookPhase> currentHookPhasesForExecution) { Map<String, List<String>> alreadyExecutedHooksForModule = getAlreadyExecutedHooks(); List<Hook> hooksCalculatedForExecution = determineHooksForExecution(alreadyExecutedHooksForModule, currentHookPhasesForExecution)...
ModuleHooksAggregator { public List<Hook> aggregateHooks(List<HookPhase> currentHookPhasesForExecution) { Map<String, List<String>> alreadyExecutedHooksForModule = getAlreadyExecutedHooks(); List<Hook> hooksCalculatedForExecution = determineHooksForExecution(alreadyExecutedHooksForModule, currentHookPhasesForExecution)...
ModuleHooksAggregator { public List<Hook> aggregateHooks(List<HookPhase> currentHookPhasesForExecution) { Map<String, List<String>> alreadyExecutedHooksForModule = getAlreadyExecutedHooks(); List<Hook> hooksCalculatedForExecution = determineHooksForExecution(alreadyExecutedHooksForModule, currentHookPhasesForExecution)...
ModuleHooksAggregator { public List<Hook> aggregateHooks(List<HookPhase> currentHookPhasesForExecution) { Map<String, List<String>> alreadyExecutedHooksForModule = getAlreadyExecutedHooks(); List<Hook> hooksCalculatedForExecution = determineHooksForExecution(alreadyExecutedHooksForModule, currentHookPhasesForExecution)...
@Test void testAggregateHooksNoAlreadyExecutedHooks() { List<Hook> hooksForModule = List.of(createHook("test-hook", List.of("deploy.application.after-stop"))); Module moduleToDeploy = createModule("test-module", hooksForModule); List<HookPhase> currentHookPhasesForExecution = List.of(HookPhase.DEPLOY_APPLICATION_AFTER_...
public List<Hook> aggregateHooks(List<HookPhase> currentHookPhasesForExecution) { Map<String, List<String>> alreadyExecutedHooksForModule = getAlreadyExecutedHooks(); List<Hook> hooksCalculatedForExecution = determineHooksForExecution(alreadyExecutedHooksForModule, currentHookPhasesForExecution); updateExecutedHooksFor...
ModuleHooksAggregator { public List<Hook> aggregateHooks(List<HookPhase> currentHookPhasesForExecution) { Map<String, List<String>> alreadyExecutedHooksForModule = getAlreadyExecutedHooks(); List<Hook> hooksCalculatedForExecution = determineHooksForExecution(alreadyExecutedHooksForModule, currentHookPhasesForExecution)...
ModuleHooksAggregator { public List<Hook> aggregateHooks(List<HookPhase> currentHookPhasesForExecution) { Map<String, List<String>> alreadyExecutedHooksForModule = getAlreadyExecutedHooks(); List<Hook> hooksCalculatedForExecution = determineHooksForExecution(alreadyExecutedHooksForModule, currentHookPhasesForExecution)...
ModuleHooksAggregator { public List<Hook> aggregateHooks(List<HookPhase> currentHookPhasesForExecution) { Map<String, List<String>> alreadyExecutedHooksForModule = getAlreadyExecutedHooks(); List<Hook> hooksCalculatedForExecution = determineHooksForExecution(alreadyExecutedHooksForModule, currentHookPhasesForExecution)...
ModuleHooksAggregator { public List<Hook> aggregateHooks(List<HookPhase> currentHookPhasesForExecution) { Map<String, List<String>> alreadyExecutedHooksForModule = getAlreadyExecutedHooks(); List<Hook> hooksCalculatedForExecution = determineHooksForExecution(alreadyExecutedHooksForModule, currentHookPhasesForExecution)...
@Test void testAggregateHooksIfTheHookForExecutionIsAlreadyExecuted() { List<Hook> hooksForModule = List.of(createHook("hook1", List.of("blue-green.application.before-stop.live")), createHook("hook2", List.of("blue-green.application.after-stop.live"))); Module moduleToDeploy = createModule("test-module", hooksForModule...
public List<Hook> aggregateHooks(List<HookPhase> currentHookPhasesForExecution) { Map<String, List<String>> alreadyExecutedHooksForModule = getAlreadyExecutedHooks(); List<Hook> hooksCalculatedForExecution = determineHooksForExecution(alreadyExecutedHooksForModule, currentHookPhasesForExecution); updateExecutedHooksFor...
ModuleHooksAggregator { public List<Hook> aggregateHooks(List<HookPhase> currentHookPhasesForExecution) { Map<String, List<String>> alreadyExecutedHooksForModule = getAlreadyExecutedHooks(); List<Hook> hooksCalculatedForExecution = determineHooksForExecution(alreadyExecutedHooksForModule, currentHookPhasesForExecution)...
ModuleHooksAggregator { public List<Hook> aggregateHooks(List<HookPhase> currentHookPhasesForExecution) { Map<String, List<String>> alreadyExecutedHooksForModule = getAlreadyExecutedHooks(); List<Hook> hooksCalculatedForExecution = determineHooksForExecution(alreadyExecutedHooksForModule, currentHookPhasesForExecution)...
ModuleHooksAggregator { public List<Hook> aggregateHooks(List<HookPhase> currentHookPhasesForExecution) { Map<String, List<String>> alreadyExecutedHooksForModule = getAlreadyExecutedHooks(); List<Hook> hooksCalculatedForExecution = determineHooksForExecution(alreadyExecutedHooksForModule, currentHookPhasesForExecution)...
ModuleHooksAggregator { public List<Hook> aggregateHooks(List<HookPhase> currentHookPhasesForExecution) { Map<String, List<String>> alreadyExecutedHooksForModule = getAlreadyExecutedHooks(); List<Hook> hooksCalculatedForExecution = determineHooksForExecution(alreadyExecutedHooksForModule, currentHookPhasesForExecution)...
@Test void testAggregateHooksIfThereAreSomeExecutedPhases() { Hook hookForExecution = createHook("hook1", List.of("blue-green.application.before-start.live")); List<Hook> hooksForModule = List.of(hookForExecution, createHook("hook2", List.of("blue-green.application.before-start.idle"))); Module moduleToDeploy = createM...
public List<Hook> aggregateHooks(List<HookPhase> currentHookPhasesForExecution) { Map<String, List<String>> alreadyExecutedHooksForModule = getAlreadyExecutedHooks(); List<Hook> hooksCalculatedForExecution = determineHooksForExecution(alreadyExecutedHooksForModule, currentHookPhasesForExecution); updateExecutedHooksFor...
ModuleHooksAggregator { public List<Hook> aggregateHooks(List<HookPhase> currentHookPhasesForExecution) { Map<String, List<String>> alreadyExecutedHooksForModule = getAlreadyExecutedHooks(); List<Hook> hooksCalculatedForExecution = determineHooksForExecution(alreadyExecutedHooksForModule, currentHookPhasesForExecution)...
ModuleHooksAggregator { public List<Hook> aggregateHooks(List<HookPhase> currentHookPhasesForExecution) { Map<String, List<String>> alreadyExecutedHooksForModule = getAlreadyExecutedHooks(); List<Hook> hooksCalculatedForExecution = determineHooksForExecution(alreadyExecutedHooksForModule, currentHookPhasesForExecution)...
ModuleHooksAggregator { public List<Hook> aggregateHooks(List<HookPhase> currentHookPhasesForExecution) { Map<String, List<String>> alreadyExecutedHooksForModule = getAlreadyExecutedHooks(); List<Hook> hooksCalculatedForExecution = determineHooksForExecution(alreadyExecutedHooksForModule, currentHookPhasesForExecution)...
ModuleHooksAggregator { public List<Hook> aggregateHooks(List<HookPhase> currentHookPhasesForExecution) { Map<String, List<String>> alreadyExecutedHooksForModule = getAlreadyExecutedHooks(); List<Hook> hooksCalculatedForExecution = determineHooksForExecution(alreadyExecutedHooksForModule, currentHookPhasesForExecution)...
@Test void testGetCertificatesCheckWhetherSymantecExists() { List<X509Certificate> providedCertificates = mtaCertificateChecker.readCertificates(Constants.SYMANTEC_CERTIFICATE_FILE); Assertions.assertEquals(1, providedCertificates.size()); Assertions.assertEquals(SYMANTEC_SUBJECT_DN, providedCertificates.get(0) .getSub...
public List<X509Certificate> readCertificates(String certificatesFilename) { try (InputStream certificatesInputStream = getClass().getResourceAsStream(certificatesFilename)) { CertificateFactory certificateFactory = CertificateFactory.getInstance(Constants.CERTIFICATE_TYPE_X_509); return (List<X509Certificate>) certifi...
JarSignatureOperations { public List<X509Certificate> readCertificates(String certificatesFilename) { try (InputStream certificatesInputStream = getClass().getResourceAsStream(certificatesFilename)) { CertificateFactory certificateFactory = CertificateFactory.getInstance(Constants.CERTIFICATE_TYPE_X_509); return (List<...
JarSignatureOperations { public List<X509Certificate> readCertificates(String certificatesFilename) { try (InputStream certificatesInputStream = getClass().getResourceAsStream(certificatesFilename)) { CertificateFactory certificateFactory = CertificateFactory.getInstance(Constants.CERTIFICATE_TYPE_X_509); return (List<...
JarSignatureOperations { public List<X509Certificate> readCertificates(String certificatesFilename) { try (InputStream certificatesInputStream = getClass().getResourceAsStream(certificatesFilename)) { CertificateFactory certificateFactory = CertificateFactory.getInstance(Constants.CERTIFICATE_TYPE_X_509); return (List<...
JarSignatureOperations { public List<X509Certificate> readCertificates(String certificatesFilename) { try (InputStream certificatesInputStream = getClass().getResourceAsStream(certificatesFilename)) { CertificateFactory certificateFactory = CertificateFactory.getInstance(Constants.CERTIFICATE_TYPE_X_509); return (List<...
@Test void testGetCertificatesWithNullInputStream() { SLException exception = Assertions.assertThrows(SLException.class, () -> mtaCertificateChecker.readCertificates("non-existing-certificate.crt")); Assertions.assertEquals("Missing input stream", exception.getMessage()); }
public List<X509Certificate> readCertificates(String certificatesFilename) { try (InputStream certificatesInputStream = getClass().getResourceAsStream(certificatesFilename)) { CertificateFactory certificateFactory = CertificateFactory.getInstance(Constants.CERTIFICATE_TYPE_X_509); return (List<X509Certificate>) certifi...
JarSignatureOperations { public List<X509Certificate> readCertificates(String certificatesFilename) { try (InputStream certificatesInputStream = getClass().getResourceAsStream(certificatesFilename)) { CertificateFactory certificateFactory = CertificateFactory.getInstance(Constants.CERTIFICATE_TYPE_X_509); return (List<...
JarSignatureOperations { public List<X509Certificate> readCertificates(String certificatesFilename) { try (InputStream certificatesInputStream = getClass().getResourceAsStream(certificatesFilename)) { CertificateFactory certificateFactory = CertificateFactory.getInstance(Constants.CERTIFICATE_TYPE_X_509); return (List<...
JarSignatureOperations { public List<X509Certificate> readCertificates(String certificatesFilename) { try (InputStream certificatesInputStream = getClass().getResourceAsStream(certificatesFilename)) { CertificateFactory certificateFactory = CertificateFactory.getInstance(Constants.CERTIFICATE_TYPE_X_509); return (List<...
JarSignatureOperations { public List<X509Certificate> readCertificates(String certificatesFilename) { try (InputStream certificatesInputStream = getClass().getResourceAsStream(certificatesFilename)) { CertificateFactory certificateFactory = CertificateFactory.getInstance(Constants.CERTIFICATE_TYPE_X_509); return (List<...
@Test void closeQuietlyConnection() throws SQLException { Connection connection = Mockito.mock(Connection.class); JdbcUtil.closeQuietly(connection); Mockito.verify(connection) .close(); }
public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } }
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } }
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } private Jdbc...
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } private Jdbc...
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } private Jdbc...
@Test void testGetDiagramDeployProcessType() { Assertions.assertEquals(Constants.DEPLOY_SERVICE_ID, processTypeToOperationMetadataMapper.getDiagramId(ProcessType.DEPLOY)); }
public String getDiagramId(ProcessType processType) { return getOperationMetadata(processType).getDiagramId(); }
ProcessTypeToOperationMetadataMapper { public String getDiagramId(ProcessType processType) { return getOperationMetadata(processType).getDiagramId(); } }
ProcessTypeToOperationMetadataMapper { public String getDiagramId(ProcessType processType) { return getOperationMetadata(processType).getDiagramId(); } }
ProcessTypeToOperationMetadataMapper { public String getDiagramId(ProcessType processType) { return getOperationMetadata(processType).getDiagramId(); } OperationMetadata getOperationMetadata(ProcessType processType); String getDiagramId(ProcessType processType); }
ProcessTypeToOperationMetadataMapper { public String getDiagramId(ProcessType processType) { return getOperationMetadata(processType).getDiagramId(); } OperationMetadata getOperationMetadata(ProcessType processType); String getDiagramId(ProcessType processType); }
@Test void testGetDiagramBlueGreenDeployProcessType() { Assertions.assertEquals(Constants.BLUE_GREEN_DEPLOY_SERVICE_ID, processTypeToOperationMetadataMapper.getDiagramId(ProcessType.BLUE_GREEN_DEPLOY)); }
public String getDiagramId(ProcessType processType) { return getOperationMetadata(processType).getDiagramId(); }
ProcessTypeToOperationMetadataMapper { public String getDiagramId(ProcessType processType) { return getOperationMetadata(processType).getDiagramId(); } }
ProcessTypeToOperationMetadataMapper { public String getDiagramId(ProcessType processType) { return getOperationMetadata(processType).getDiagramId(); } }
ProcessTypeToOperationMetadataMapper { public String getDiagramId(ProcessType processType) { return getOperationMetadata(processType).getDiagramId(); } OperationMetadata getOperationMetadata(ProcessType processType); String getDiagramId(ProcessType processType); }
ProcessTypeToOperationMetadataMapper { public String getDiagramId(ProcessType processType) { return getOperationMetadata(processType).getDiagramId(); } OperationMetadata getOperationMetadata(ProcessType processType); String getDiagramId(ProcessType processType); }
@Test void testGetDiagramUndeployProcessType() { Assertions.assertEquals(Constants.UNDEPLOY_SERVICE_ID, processTypeToOperationMetadataMapper.getDiagramId(ProcessType.UNDEPLOY)); }
public String getDiagramId(ProcessType processType) { return getOperationMetadata(processType).getDiagramId(); }
ProcessTypeToOperationMetadataMapper { public String getDiagramId(ProcessType processType) { return getOperationMetadata(processType).getDiagramId(); } }
ProcessTypeToOperationMetadataMapper { public String getDiagramId(ProcessType processType) { return getOperationMetadata(processType).getDiagramId(); } }
ProcessTypeToOperationMetadataMapper { public String getDiagramId(ProcessType processType) { return getOperationMetadata(processType).getDiagramId(); } OperationMetadata getOperationMetadata(ProcessType processType); String getDiagramId(ProcessType processType); }
ProcessTypeToOperationMetadataMapper { public String getDiagramId(ProcessType processType) { return getOperationMetadata(processType).getDiagramId(); } OperationMetadata getOperationMetadata(ProcessType processType); String getDiagramId(ProcessType processType); }
@Test void testGetDiagramCtsDeployProcessType() { Assertions.assertEquals(Constants.CTS_DEPLOY_SERVICE_ID, processTypeToOperationMetadataMapper.getDiagramId(ProcessType.CTS_DEPLOY)); }
public String getDiagramId(ProcessType processType) { return getOperationMetadata(processType).getDiagramId(); }
ProcessTypeToOperationMetadataMapper { public String getDiagramId(ProcessType processType) { return getOperationMetadata(processType).getDiagramId(); } }
ProcessTypeToOperationMetadataMapper { public String getDiagramId(ProcessType processType) { return getOperationMetadata(processType).getDiagramId(); } }
ProcessTypeToOperationMetadataMapper { public String getDiagramId(ProcessType processType) { return getOperationMetadata(processType).getDiagramId(); } OperationMetadata getOperationMetadata(ProcessType processType); String getDiagramId(ProcessType processType); }
ProcessTypeToOperationMetadataMapper { public String getDiagramId(ProcessType processType) { return getOperationMetadata(processType).getDiagramId(); } OperationMetadata getOperationMetadata(ProcessType processType); String getDiagramId(ProcessType processType); }
@Test void testConvertWithInvalidValueType() { assertThrows(SLException.class, () -> new VersionRuleParameterConverter().convert(false)); }
@Override public Object convert(Object value) { String versionRule = String.valueOf(value); validate(versionRule); return versionRule; }
VersionRuleParameterConverter implements ParameterConverter { @Override public Object convert(Object value) { String versionRule = String.valueOf(value); validate(versionRule); return versionRule; } }
VersionRuleParameterConverter implements ParameterConverter { @Override public Object convert(Object value) { String versionRule = String.valueOf(value); validate(versionRule); return versionRule; } }
VersionRuleParameterConverter implements ParameterConverter { @Override public Object convert(Object value) { String versionRule = String.valueOf(value); validate(versionRule); return versionRule; } @Override Object convert(Object value); }
VersionRuleParameterConverter implements ParameterConverter { @Override public Object convert(Object value) { String versionRule = String.valueOf(value); validate(versionRule); return versionRule; } @Override Object convert(Object value); }
@Test void testConvertWithInvalidValue() { assertThrows(SLException.class, () -> new VersionRuleParameterConverter().convert("foo")); }
@Override public Object convert(Object value) { String versionRule = String.valueOf(value); validate(versionRule); return versionRule; }
VersionRuleParameterConverter implements ParameterConverter { @Override public Object convert(Object value) { String versionRule = String.valueOf(value); validate(versionRule); return versionRule; } }
VersionRuleParameterConverter implements ParameterConverter { @Override public Object convert(Object value) { String versionRule = String.valueOf(value); validate(versionRule); return versionRule; } }
VersionRuleParameterConverter implements ParameterConverter { @Override public Object convert(Object value) { String versionRule = String.valueOf(value); validate(versionRule); return versionRule; } @Override Object convert(Object value); }
VersionRuleParameterConverter implements ParameterConverter { @Override public Object convert(Object value) { String versionRule = String.valueOf(value); validate(versionRule); return versionRule; } @Override Object convert(Object value); }
@Test void testConvert() { String versionRule = (String) new VersionRuleParameterConverter().convert("ALL"); assertEquals("ALL", versionRule); }
@Override public Object convert(Object value) { String versionRule = String.valueOf(value); validate(versionRule); return versionRule; }
VersionRuleParameterConverter implements ParameterConverter { @Override public Object convert(Object value) { String versionRule = String.valueOf(value); validate(versionRule); return versionRule; } }
VersionRuleParameterConverter implements ParameterConverter { @Override public Object convert(Object value) { String versionRule = String.valueOf(value); validate(versionRule); return versionRule; } }
VersionRuleParameterConverter implements ParameterConverter { @Override public Object convert(Object value) { String versionRule = String.valueOf(value); validate(versionRule); return versionRule; } @Override Object convert(Object value); }
VersionRuleParameterConverter implements ParameterConverter { @Override public Object convert(Object value) { String versionRule = String.valueOf(value); validate(versionRule); return versionRule; } @Override Object convert(Object value); }
@Test void testConvertWithInvalidValueType() { assertThrows(SLException.class, () -> new StartTimeoutParameterConverter().convert(false)); }
@Override public Integer convert(Object value) { int startTimeout = super.convert(value); if (startTimeout < 0) { throw new SLException(Messages.ERROR_PARAMETER_1_MUST_NOT_BE_NEGATIVE, startTimeout, Variables.START_TIMEOUT.getName()); } return startTimeout; }
StartTimeoutParameterConverter extends IntegerParameterConverter { @Override public Integer convert(Object value) { int startTimeout = super.convert(value); if (startTimeout < 0) { throw new SLException(Messages.ERROR_PARAMETER_1_MUST_NOT_BE_NEGATIVE, startTimeout, Variables.START_TIMEOUT.getName()); } return startTime...
StartTimeoutParameterConverter extends IntegerParameterConverter { @Override public Integer convert(Object value) { int startTimeout = super.convert(value); if (startTimeout < 0) { throw new SLException(Messages.ERROR_PARAMETER_1_MUST_NOT_BE_NEGATIVE, startTimeout, Variables.START_TIMEOUT.getName()); } return startTime...
StartTimeoutParameterConverter extends IntegerParameterConverter { @Override public Integer convert(Object value) { int startTimeout = super.convert(value); if (startTimeout < 0) { throw new SLException(Messages.ERROR_PARAMETER_1_MUST_NOT_BE_NEGATIVE, startTimeout, Variables.START_TIMEOUT.getName()); } return startTime...
StartTimeoutParameterConverter extends IntegerParameterConverter { @Override public Integer convert(Object value) { int startTimeout = super.convert(value); if (startTimeout < 0) { throw new SLException(Messages.ERROR_PARAMETER_1_MUST_NOT_BE_NEGATIVE, startTimeout, Variables.START_TIMEOUT.getName()); } return startTime...
@Test void testConvertWithInvalidValue() { assertThrows(SLException.class, () -> new StartTimeoutParameterConverter().convert(-1000)); }
@Override public Integer convert(Object value) { int startTimeout = super.convert(value); if (startTimeout < 0) { throw new SLException(Messages.ERROR_PARAMETER_1_MUST_NOT_BE_NEGATIVE, startTimeout, Variables.START_TIMEOUT.getName()); } return startTimeout; }
StartTimeoutParameterConverter extends IntegerParameterConverter { @Override public Integer convert(Object value) { int startTimeout = super.convert(value); if (startTimeout < 0) { throw new SLException(Messages.ERROR_PARAMETER_1_MUST_NOT_BE_NEGATIVE, startTimeout, Variables.START_TIMEOUT.getName()); } return startTime...
StartTimeoutParameterConverter extends IntegerParameterConverter { @Override public Integer convert(Object value) { int startTimeout = super.convert(value); if (startTimeout < 0) { throw new SLException(Messages.ERROR_PARAMETER_1_MUST_NOT_BE_NEGATIVE, startTimeout, Variables.START_TIMEOUT.getName()); } return startTime...
StartTimeoutParameterConverter extends IntegerParameterConverter { @Override public Integer convert(Object value) { int startTimeout = super.convert(value); if (startTimeout < 0) { throw new SLException(Messages.ERROR_PARAMETER_1_MUST_NOT_BE_NEGATIVE, startTimeout, Variables.START_TIMEOUT.getName()); } return startTime...
StartTimeoutParameterConverter extends IntegerParameterConverter { @Override public Integer convert(Object value) { int startTimeout = super.convert(value); if (startTimeout < 0) { throw new SLException(Messages.ERROR_PARAMETER_1_MUST_NOT_BE_NEGATIVE, startTimeout, Variables.START_TIMEOUT.getName()); } return startTime...
@Test void testConvert() { int startTimeout = (int) new StartTimeoutParameterConverter().convert("1000"); assertEquals(1000, startTimeout); }
@Override public Integer convert(Object value) { int startTimeout = super.convert(value); if (startTimeout < 0) { throw new SLException(Messages.ERROR_PARAMETER_1_MUST_NOT_BE_NEGATIVE, startTimeout, Variables.START_TIMEOUT.getName()); } return startTimeout; }
StartTimeoutParameterConverter extends IntegerParameterConverter { @Override public Integer convert(Object value) { int startTimeout = super.convert(value); if (startTimeout < 0) { throw new SLException(Messages.ERROR_PARAMETER_1_MUST_NOT_BE_NEGATIVE, startTimeout, Variables.START_TIMEOUT.getName()); } return startTime...
StartTimeoutParameterConverter extends IntegerParameterConverter { @Override public Integer convert(Object value) { int startTimeout = super.convert(value); if (startTimeout < 0) { throw new SLException(Messages.ERROR_PARAMETER_1_MUST_NOT_BE_NEGATIVE, startTimeout, Variables.START_TIMEOUT.getName()); } return startTime...
StartTimeoutParameterConverter extends IntegerParameterConverter { @Override public Integer convert(Object value) { int startTimeout = super.convert(value); if (startTimeout < 0) { throw new SLException(Messages.ERROR_PARAMETER_1_MUST_NOT_BE_NEGATIVE, startTimeout, Variables.START_TIMEOUT.getName()); } return startTime...
StartTimeoutParameterConverter extends IntegerParameterConverter { @Override public Integer convert(Object value) { int startTimeout = super.convert(value); if (startTimeout < 0) { throw new SLException(Messages.ERROR_PARAMETER_1_MUST_NOT_BE_NEGATIVE, startTimeout, Variables.START_TIMEOUT.getName()); } return startTime...
@Test void closeQuietlyConnectionWithException() throws SQLException { Connection connection = Mockito.mock(Connection.class); Mockito.doThrow(new SQLException()) .when(connection) .close(); JdbcUtil.closeQuietly(connection); Mockito.verify(connection) .close(); }
public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } }
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } }
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } private Jdbc...
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } private Jdbc...
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } private Jdbc...
@Test void testGetHookPhasesBeforeStep() { Mockito.when(hooksPhaseBuilder.buildHookPhases(List.of(HookPhase.BEFORE_START), context)) .thenReturn(List.of(HookPhase.BLUE_GREEN_APPLICATION_BEFORE_START_LIVE)); List<HookPhase> expectedHooks = List.of(HookPhase.BLUE_GREEN_APPLICATION_BEFORE_START_LIVE); List<HookPhase> hook...
@Override public List<HookPhase> getHookPhasesBeforeStep(ProcessContext context) { return hooksPhaseBuilder.buildHookPhases(Collections.singletonList(HookPhase.BEFORE_START), context); }
RestartAppStep extends TimeoutAsyncFlowableStepWithHooks implements BeforeStepHookPhaseProvider { @Override public List<HookPhase> getHookPhasesBeforeStep(ProcessContext context) { return hooksPhaseBuilder.buildHookPhases(Collections.singletonList(HookPhase.BEFORE_START), context); } }
RestartAppStep extends TimeoutAsyncFlowableStepWithHooks implements BeforeStepHookPhaseProvider { @Override public List<HookPhase> getHookPhasesBeforeStep(ProcessContext context) { return hooksPhaseBuilder.buildHookPhases(Collections.singletonList(HookPhase.BEFORE_START), context); } }
RestartAppStep extends TimeoutAsyncFlowableStepWithHooks implements BeforeStepHookPhaseProvider { @Override public List<HookPhase> getHookPhasesBeforeStep(ProcessContext context) { return hooksPhaseBuilder.buildHookPhases(Collections.singletonList(HookPhase.BEFORE_START), context); } @Override StepPhase executePolling...
RestartAppStep extends TimeoutAsyncFlowableStepWithHooks implements BeforeStepHookPhaseProvider { @Override public List<HookPhase> getHookPhasesBeforeStep(ProcessContext context) { return hooksPhaseBuilder.buildHookPhases(Collections.singletonList(HookPhase.BEFORE_START), context); } @Override StepPhase executePolling...
@Test void testUpdateServiceMetadata() { CloudServiceInstanceExtended serviceToProcess = buildServiceToProcess(); prepareServiceToProcess(serviceToProcess); prepareClient(serviceToProcess); step.execute(execution); verify(client).updateServiceInstanceMetadata(serviceToProcess.getMetadata() .getGuid(), serviceToProcess....
private MethodExecution<String> updateServiceMetadata(CloudControllerClient controllerClient, CloudServiceInstanceExtended service) { getStepLogger().debug(Messages.UPDATING_METADATA_OF_SERVICE_INSTANCE_0, service.getName(), service.getResourceName()); updateServiceMetadata(service, controllerClient); getStepLogger().d...
UpdateServiceMetadataStep extends ServiceStep { private MethodExecution<String> updateServiceMetadata(CloudControllerClient controllerClient, CloudServiceInstanceExtended service) { getStepLogger().debug(Messages.UPDATING_METADATA_OF_SERVICE_INSTANCE_0, service.getName(), service.getResourceName()); updateServiceMetada...
UpdateServiceMetadataStep extends ServiceStep { private MethodExecution<String> updateServiceMetadata(CloudControllerClient controllerClient, CloudServiceInstanceExtended service) { getStepLogger().debug(Messages.UPDATING_METADATA_OF_SERVICE_INSTANCE_0, service.getName(), service.getResourceName()); updateServiceMetada...
UpdateServiceMetadataStep extends ServiceStep { private MethodExecution<String> updateServiceMetadata(CloudControllerClient controllerClient, CloudServiceInstanceExtended service) { getStepLogger().debug(Messages.UPDATING_METADATA_OF_SERVICE_INSTANCE_0, service.getName(), service.getResourceName()); updateServiceMetada...
UpdateServiceMetadataStep extends ServiceStep { private MethodExecution<String> updateServiceMetadata(CloudControllerClient controllerClient, CloudServiceInstanceExtended service) { getStepLogger().debug(Messages.UPDATING_METADATA_OF_SERVICE_INSTANCE_0, service.getName(), service.getResourceName()); updateServiceMetada...
@Test void testExecute() { Metadata v3Metadata = Metadata.builder() .annotation("a", "b") .annotation("c", "d") .build(); CloudServiceInstanceExtended serviceInstanceToCreate = ImmutableCloudServiceInstanceExtended.builder() .name(SERVICE_INSTANCE_NAME) .plan(SERVICE_INSTANCE_PLAN) .label(SERVICE_INSTANCE_LABEL) .v3Met...
@Override public AsyncExecutionState execute(ProcessContext context) { CloudServiceInstanceExtended serviceInstance = context.getVariable(Variables.SERVICE_TO_PROCESS); context.getStepLogger() .debug(Messages.UPDATING_METADATA_OF_SERVICE_INSTANCE_0, serviceInstance.getName()); updateMetadata(context.getControllerClient...
UpdateServiceMetadataExecution implements AsyncExecution { @Override public AsyncExecutionState execute(ProcessContext context) { CloudServiceInstanceExtended serviceInstance = context.getVariable(Variables.SERVICE_TO_PROCESS); context.getStepLogger() .debug(Messages.UPDATING_METADATA_OF_SERVICE_INSTANCE_0, serviceInst...
UpdateServiceMetadataExecution implements AsyncExecution { @Override public AsyncExecutionState execute(ProcessContext context) { CloudServiceInstanceExtended serviceInstance = context.getVariable(Variables.SERVICE_TO_PROCESS); context.getStepLogger() .debug(Messages.UPDATING_METADATA_OF_SERVICE_INSTANCE_0, serviceInst...
UpdateServiceMetadataExecution implements AsyncExecution { @Override public AsyncExecutionState execute(ProcessContext context) { CloudServiceInstanceExtended serviceInstance = context.getVariable(Variables.SERVICE_TO_PROCESS); context.getStepLogger() .debug(Messages.UPDATING_METADATA_OF_SERVICE_INSTANCE_0, serviceInst...
UpdateServiceMetadataExecution implements AsyncExecution { @Override public AsyncExecutionState execute(ProcessContext context) { CloudServiceInstanceExtended serviceInstance = context.getVariable(Variables.SERVICE_TO_PROCESS); context.getStepLogger() .debug(Messages.UPDATING_METADATA_OF_SERVICE_INSTANCE_0, serviceInst...
@Test void testPostExecutionStep() { Mockito.when(context.getVariable(Variables.TASK_ID)) .thenReturn(TASK_GUID); FlowElement flowElement = Mockito.mock(SubProcess.class); Mockito.when(execution.getCurrentFlowElement()) .thenReturn(flowElement); processStepHelper.postExecuteStep(context, StepPhase.DONE); Mockito.verify...
protected void postExecuteStep(ProcessContext context, StepPhase state) { logDebug(MessageFormat.format(Messages.STEP_FINISHED, context.getExecution() .getCurrentFlowElement() .getName())); getProcessLogsPersister().persistLogs(context.getVariable(Variables.CORRELATION_ID), context.getVariable(Variables.TASK_ID)); cont...
ProcessStepHelper { protected void postExecuteStep(ProcessContext context, StepPhase state) { logDebug(MessageFormat.format(Messages.STEP_FINISHED, context.getExecution() .getCurrentFlowElement() .getName())); getProcessLogsPersister().persistLogs(context.getVariable(Variables.CORRELATION_ID), context.getVariable(Varia...
ProcessStepHelper { protected void postExecuteStep(ProcessContext context, StepPhase state) { logDebug(MessageFormat.format(Messages.STEP_FINISHED, context.getExecution() .getCurrentFlowElement() .getName())); getProcessLogsPersister().persistLogs(context.getVariable(Variables.CORRELATION_ID), context.getVariable(Varia...
ProcessStepHelper { protected void postExecuteStep(ProcessContext context, StepPhase state) { logDebug(MessageFormat.format(Messages.STEP_FINISHED, context.getExecution() .getCurrentFlowElement() .getName())); getProcessLogsPersister().persistLogs(context.getVariable(Variables.CORRELATION_ID), context.getVariable(Varia...
ProcessStepHelper { protected void postExecuteStep(ProcessContext context, StepPhase state) { logDebug(MessageFormat.format(Messages.STEP_FINISHED, context.getExecution() .getCurrentFlowElement() .getName())); getProcessLogsPersister().persistLogs(context.getVariable(Variables.CORRELATION_ID), context.getVariable(Varia...
@Test void testLogExceptionAndStoreExceptionContentError() { prepareProgressMessagesService(); processStepHelper.logExceptionAndStoreProgressMessage(context, new ContentException("content exception")); Mockito.verify(context) .setVariable(Variables.ERROR_TYPE, ErrorType.CONTENT_ERROR); Mockito.verify(progressMessageSer...
protected void logExceptionAndStoreProgressMessage(ProcessContext context, Throwable t) { logException(context, t); storeExceptionInProgressMessageService(context, t); }
ProcessStepHelper { protected void logExceptionAndStoreProgressMessage(ProcessContext context, Throwable t) { logException(context, t); storeExceptionInProgressMessageService(context, t); } }
ProcessStepHelper { protected void logExceptionAndStoreProgressMessage(ProcessContext context, Throwable t) { logException(context, t); storeExceptionInProgressMessageService(context, t); } }
ProcessStepHelper { protected void logExceptionAndStoreProgressMessage(ProcessContext context, Throwable t) { logException(context, t); storeExceptionInProgressMessageService(context, t); } void failStepIfProcessIsAborted(ProcessContext context); static boolean isProcessAborted(List<HistoricOperationEvent> historicOpe...
ProcessStepHelper { protected void logExceptionAndStoreProgressMessage(ProcessContext context, Throwable t) { logException(context, t); storeExceptionInProgressMessageService(context, t); } void failStepIfProcessIsAborted(ProcessContext context); static boolean isProcessAborted(List<HistoricOperationEvent> historicOpe...
@Test void testLogExceptionAndStoreExceptionUnknownError() { prepareProgressMessagesService(); processStepHelper.logExceptionAndStoreProgressMessage(context, new RuntimeException("runtime exception")); Mockito.verify(context) .setVariable(Variables.ERROR_TYPE, ErrorType.UNKNOWN_ERROR); Mockito.verify(progressMessageSer...
protected void logExceptionAndStoreProgressMessage(ProcessContext context, Throwable t) { logException(context, t); storeExceptionInProgressMessageService(context, t); }
ProcessStepHelper { protected void logExceptionAndStoreProgressMessage(ProcessContext context, Throwable t) { logException(context, t); storeExceptionInProgressMessageService(context, t); } }
ProcessStepHelper { protected void logExceptionAndStoreProgressMessage(ProcessContext context, Throwable t) { logException(context, t); storeExceptionInProgressMessageService(context, t); } }
ProcessStepHelper { protected void logExceptionAndStoreProgressMessage(ProcessContext context, Throwable t) { logException(context, t); storeExceptionInProgressMessageService(context, t); } void failStepIfProcessIsAborted(ProcessContext context); static boolean isProcessAborted(List<HistoricOperationEvent> historicOpe...
ProcessStepHelper { protected void logExceptionAndStoreProgressMessage(ProcessContext context, Throwable t) { logException(context, t); storeExceptionInProgressMessageService(context, t); } void failStepIfProcessIsAborted(ProcessContext context); static boolean isProcessAborted(List<HistoricOperationEvent> historicOpe...
@Test void testFailStepPhaseAbortIsInvoked() { prepareHistoricOperationsEventGetter(HistoricOperationEvent.EventType.STARTED, HistoricOperationEvent.EventType.FINISHED, HistoricOperationEvent.EventType.ABORT_EXECUTED); Exception exception = Assertions.assertThrows(SLException.class, () -> processStepHelper.failStepIfPr...
public void failStepIfProcessIsAborted(ProcessContext context) { String correlationId = context.getVariable(Variables.CORRELATION_ID); List<HistoricOperationEvent> historicOperationEvents = getProcessHelper().getHistoricOperationEventByProcessId(correlationId); if (isProcessAborted(historicOperationEvents)) { throw new...
ProcessStepHelper { public void failStepIfProcessIsAborted(ProcessContext context) { String correlationId = context.getVariable(Variables.CORRELATION_ID); List<HistoricOperationEvent> historicOperationEvents = getProcessHelper().getHistoricOperationEventByProcessId(correlationId); if (isProcessAborted(historicOperation...
ProcessStepHelper { public void failStepIfProcessIsAborted(ProcessContext context) { String correlationId = context.getVariable(Variables.CORRELATION_ID); List<HistoricOperationEvent> historicOperationEvents = getProcessHelper().getHistoricOperationEventByProcessId(correlationId); if (isProcessAborted(historicOperation...
ProcessStepHelper { public void failStepIfProcessIsAborted(ProcessContext context) { String correlationId = context.getVariable(Variables.CORRELATION_ID); List<HistoricOperationEvent> historicOperationEvents = getProcessHelper().getHistoricOperationEventByProcessId(correlationId); if (isProcessAborted(historicOperation...
ProcessStepHelper { public void failStepIfProcessIsAborted(ProcessContext context) { String correlationId = context.getVariable(Variables.CORRELATION_ID); List<HistoricOperationEvent> historicOperationEvents = getProcessHelper().getHistoricOperationEventByProcessId(correlationId); if (isProcessAborted(historicOperation...
@Test void testFailedStepPhaseAbortIsNotInvoked() { prepareHistoricOperationsEventGetter(HistoricOperationEvent.EventType.STARTED, HistoricOperationEvent.EventType.FINISHED); Assertions.assertDoesNotThrow(() -> processStepHelper.failStepIfProcessIsAborted(context)); }
public void failStepIfProcessIsAborted(ProcessContext context) { String correlationId = context.getVariable(Variables.CORRELATION_ID); List<HistoricOperationEvent> historicOperationEvents = getProcessHelper().getHistoricOperationEventByProcessId(correlationId); if (isProcessAborted(historicOperationEvents)) { throw new...
ProcessStepHelper { public void failStepIfProcessIsAborted(ProcessContext context) { String correlationId = context.getVariable(Variables.CORRELATION_ID); List<HistoricOperationEvent> historicOperationEvents = getProcessHelper().getHistoricOperationEventByProcessId(correlationId); if (isProcessAborted(historicOperation...
ProcessStepHelper { public void failStepIfProcessIsAborted(ProcessContext context) { String correlationId = context.getVariable(Variables.CORRELATION_ID); List<HistoricOperationEvent> historicOperationEvents = getProcessHelper().getHistoricOperationEventByProcessId(correlationId); if (isProcessAborted(historicOperation...
ProcessStepHelper { public void failStepIfProcessIsAborted(ProcessContext context) { String correlationId = context.getVariable(Variables.CORRELATION_ID); List<HistoricOperationEvent> historicOperationEvents = getProcessHelper().getHistoricOperationEventByProcessId(correlationId); if (isProcessAborted(historicOperation...
ProcessStepHelper { public void failStepIfProcessIsAborted(ProcessContext context) { String correlationId = context.getVariable(Variables.CORRELATION_ID); List<HistoricOperationEvent> historicOperationEvents = getProcessHelper().getHistoricOperationEventByProcessId(correlationId); if (isProcessAborted(historicOperation...
@Test void getGitUriTest() throws SLException { String gitUri = "https: context.setVariable(Variables.GIT_URI, gitUri); assertEquals(gitUri, step.getGitUri(context)); }
protected String getGitUri(ProcessContext context) { String gitUriParam = StepsUtil.getGitRepoUri(context); try { return new URL(gitUriParam).toString(); } catch (MalformedURLException e) { throw new ContentException(e, Messages.GIT_URI_IS_NOT_SPECIFIED); } }
ProcessGitSourceStep extends SyncFlowableStep { protected String getGitUri(ProcessContext context) { String gitUriParam = StepsUtil.getGitRepoUri(context); try { return new URL(gitUriParam).toString(); } catch (MalformedURLException e) { throw new ContentException(e, Messages.GIT_URI_IS_NOT_SPECIFIED); } } }
ProcessGitSourceStep extends SyncFlowableStep { protected String getGitUri(ProcessContext context) { String gitUriParam = StepsUtil.getGitRepoUri(context); try { return new URL(gitUriParam).toString(); } catch (MalformedURLException e) { throw new ContentException(e, Messages.GIT_URI_IS_NOT_SPECIFIED); } } }
ProcessGitSourceStep extends SyncFlowableStep { protected String getGitUri(ProcessContext context) { String gitUriParam = StepsUtil.getGitRepoUri(context); try { return new URL(gitUriParam).toString(); } catch (MalformedURLException e) { throw new ContentException(e, Messages.GIT_URI_IS_NOT_SPECIFIED); } } }
ProcessGitSourceStep extends SyncFlowableStep { protected String getGitUri(ProcessContext context) { String gitUriParam = StepsUtil.getGitRepoUri(context); try { return new URL(gitUriParam).toString(); } catch (MalformedURLException e) { throw new ContentException(e, Messages.GIT_URI_IS_NOT_SPECIFIED); } } static fin...
@Test void testExtractRepoName() { String somerepoName = step.extractRepoName("https: assertEquals("somerepo" + PROCESS_INSTANCE_ID, somerepoName); String otherrepoName = step.extractRepoName("https: assertEquals("otherrepo" + PROCESS_INSTANCE_ID, otherrepoName); }
protected String extractRepoName(String gitUri, String processId) { if (!gitUri.endsWith(PATH_SEPARATOR + org.eclipse.jgit.lib.Constants.DOT_GIT)) { return gitUri.substring(gitUri.lastIndexOf(PATH_SEPARATOR) + 1) + processId; } String repoLocation = gitUri.substring(0, gitUri.lastIndexOf(PATH_SEPARATOR + org.eclipse.jg...
ProcessGitSourceStep extends SyncFlowableStep { protected String extractRepoName(String gitUri, String processId) { if (!gitUri.endsWith(PATH_SEPARATOR + org.eclipse.jgit.lib.Constants.DOT_GIT)) { return gitUri.substring(gitUri.lastIndexOf(PATH_SEPARATOR) + 1) + processId; } String repoLocation = gitUri.substring(0, gi...
ProcessGitSourceStep extends SyncFlowableStep { protected String extractRepoName(String gitUri, String processId) { if (!gitUri.endsWith(PATH_SEPARATOR + org.eclipse.jgit.lib.Constants.DOT_GIT)) { return gitUri.substring(gitUri.lastIndexOf(PATH_SEPARATOR) + 1) + processId; } String repoLocation = gitUri.substring(0, gi...
ProcessGitSourceStep extends SyncFlowableStep { protected String extractRepoName(String gitUri, String processId) { if (!gitUri.endsWith(PATH_SEPARATOR + org.eclipse.jgit.lib.Constants.DOT_GIT)) { return gitUri.substring(gitUri.lastIndexOf(PATH_SEPARATOR) + 1) + processId; } String repoLocation = gitUri.substring(0, gi...
ProcessGitSourceStep extends SyncFlowableStep { protected String extractRepoName(String gitUri, String processId) { if (!gitUri.endsWith(PATH_SEPARATOR + org.eclipse.jgit.lib.Constants.DOT_GIT)) { return gitUri.substring(gitUri.lastIndexOf(PATH_SEPARATOR) + 1) + processId; } String repoLocation = gitUri.substring(0, gi...
@Test void closeQuietlyConnectionWithNull() { Connection connection = null; Assertions.assertDoesNotThrow(() -> JdbcUtil.closeQuietly(connection)); }
public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } }
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } }
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } private Jdbc...
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } private Jdbc...
JdbcUtil { public static void closeQuietly(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException e) { logSQLException(e); LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } catch (Exception e) { LOGGER.warn(Messages.COULD_NOT_CLOSE_RESULT_SET, e); } } private Jdbc...
@Test void testConvertToDatabaseColumnWhenInputIsNotNull() { Assertions.assertEquals("test", textAttributeConverter.convertToDatabaseColumn("test")); }
@Override public String convertToDatabaseColumn(String text) { if (text != null) { return StringUtils.abbreviate(text, MAX_STRING_LENGTH); } return ""; }
TextAttributeConverter implements AttributeConverter<String, String> { @Override public String convertToDatabaseColumn(String text) { if (text != null) { return StringUtils.abbreviate(text, MAX_STRING_LENGTH); } return ""; } }
TextAttributeConverter implements AttributeConverter<String, String> { @Override public String convertToDatabaseColumn(String text) { if (text != null) { return StringUtils.abbreviate(text, MAX_STRING_LENGTH); } return ""; } }
TextAttributeConverter implements AttributeConverter<String, String> { @Override public String convertToDatabaseColumn(String text) { if (text != null) { return StringUtils.abbreviate(text, MAX_STRING_LENGTH); } return ""; } @Override String convertToDatabaseColumn(String text); @Override String convertToEntityAttribu...
TextAttributeConverter implements AttributeConverter<String, String> { @Override public String convertToDatabaseColumn(String text) { if (text != null) { return StringUtils.abbreviate(text, MAX_STRING_LENGTH); } return ""; } @Override String convertToDatabaseColumn(String text); @Override String convertToEntityAttribu...
@Test void testGetErrorMessage() { String applicationName = "another-app"; mockApplication(applicationName); Assertions.assertEquals(MessageFormat.format(Messages.ERROR_STAGING_APP_0, applicationName), step.getStepErrorMessage(context)); }
@Override protected String getStepErrorMessage(ProcessContext context) { return MessageFormat.format(Messages.ERROR_STAGING_APP_0, context.getVariable(Variables.APP_TO_PROCESS) .getName()); }
StageAppStep extends TimeoutAsyncFlowableStep { @Override protected String getStepErrorMessage(ProcessContext context) { return MessageFormat.format(Messages.ERROR_STAGING_APP_0, context.getVariable(Variables.APP_TO_PROCESS) .getName()); } }
StageAppStep extends TimeoutAsyncFlowableStep { @Override protected String getStepErrorMessage(ProcessContext context) { return MessageFormat.format(Messages.ERROR_STAGING_APP_0, context.getVariable(Variables.APP_TO_PROCESS) .getName()); } }
StageAppStep extends TimeoutAsyncFlowableStep { @Override protected String getStepErrorMessage(ProcessContext context) { return MessageFormat.format(Messages.ERROR_STAGING_APP_0, context.getVariable(Variables.APP_TO_PROCESS) .getName()); } @Override Integer getTimeout(ProcessContext context); }
StageAppStep extends TimeoutAsyncFlowableStep { @Override protected String getStepErrorMessage(ProcessContext context) { return MessageFormat.format(Messages.ERROR_STAGING_APP_0, context.getVariable(Variables.APP_TO_PROCESS) .getName()); } @Override Integer getTimeout(ProcessContext context); }
@Test void testAsyncExecutionStatus() { List<AsyncExecution> asyncStepExecutions = step.getAsyncStepExecutions(context); Assertions.assertEquals(1, asyncStepExecutions.size()); Assertions.assertTrue(asyncStepExecutions.get(0) instanceof PollStageAppStatusExecution); }
@Override protected List<AsyncExecution> getAsyncStepExecutions(ProcessContext context) { return Collections.singletonList(new PollStageAppStatusExecution(recentLogsRetriever, new ApplicationStager(context))); }
StageAppStep extends TimeoutAsyncFlowableStep { @Override protected List<AsyncExecution> getAsyncStepExecutions(ProcessContext context) { return Collections.singletonList(new PollStageAppStatusExecution(recentLogsRetriever, new ApplicationStager(context))); } }
StageAppStep extends TimeoutAsyncFlowableStep { @Override protected List<AsyncExecution> getAsyncStepExecutions(ProcessContext context) { return Collections.singletonList(new PollStageAppStatusExecution(recentLogsRetriever, new ApplicationStager(context))); } }
StageAppStep extends TimeoutAsyncFlowableStep { @Override protected List<AsyncExecution> getAsyncStepExecutions(ProcessContext context) { return Collections.singletonList(new PollStageAppStatusExecution(recentLogsRetriever, new ApplicationStager(context))); } @Override Integer getTimeout(ProcessContext context); }
StageAppStep extends TimeoutAsyncFlowableStep { @Override protected List<AsyncExecution> getAsyncStepExecutions(ProcessContext context) { return Collections.singletonList(new PollStageAppStatusExecution(recentLogsRetriever, new ApplicationStager(context))); } @Override Integer getTimeout(ProcessContext context); }
@Test void testGetTimeoutDefaultValue() { Assertions.assertEquals(Variables.START_TIMEOUT.getDefaultValue(), step.getTimeout(context)); }
@Override public Integer getTimeout(ProcessContext context) { return context.getVariable(Variables.START_TIMEOUT); }
StageAppStep extends TimeoutAsyncFlowableStep { @Override public Integer getTimeout(ProcessContext context) { return context.getVariable(Variables.START_TIMEOUT); } }
StageAppStep extends TimeoutAsyncFlowableStep { @Override public Integer getTimeout(ProcessContext context) { return context.getVariable(Variables.START_TIMEOUT); } }
StageAppStep extends TimeoutAsyncFlowableStep { @Override public Integer getTimeout(ProcessContext context) { return context.getVariable(Variables.START_TIMEOUT); } @Override Integer getTimeout(ProcessContext context); }
StageAppStep extends TimeoutAsyncFlowableStep { @Override public Integer getTimeout(ProcessContext context) { return context.getVariable(Variables.START_TIMEOUT); } @Override Integer getTimeout(ProcessContext context); }
@Test void testGetTimeoutCustomValue() { int timeout = 10; context.setVariable(Variables.START_TIMEOUT, timeout); Assertions.assertEquals(timeout, step.getTimeout(context)); }
@Override public Integer getTimeout(ProcessContext context) { return context.getVariable(Variables.START_TIMEOUT); }
StageAppStep extends TimeoutAsyncFlowableStep { @Override public Integer getTimeout(ProcessContext context) { return context.getVariable(Variables.START_TIMEOUT); } }
StageAppStep extends TimeoutAsyncFlowableStep { @Override public Integer getTimeout(ProcessContext context) { return context.getVariable(Variables.START_TIMEOUT); } }
StageAppStep extends TimeoutAsyncFlowableStep { @Override public Integer getTimeout(ProcessContext context) { return context.getVariable(Variables.START_TIMEOUT); } @Override Integer getTimeout(ProcessContext context); }
StageAppStep extends TimeoutAsyncFlowableStep { @Override public Integer getTimeout(ProcessContext context) { return context.getVariable(Variables.START_TIMEOUT); } @Override Integer getTimeout(ProcessContext context); }
@Test void testErrorMessage() { Assertions.assertEquals(Messages.ERROR_DELETING_IDLE_ROUTES, step.getStepErrorMessage(context)); }
@Override protected String getStepErrorMessage(ProcessContext context) { return Messages.ERROR_DELETING_IDLE_ROUTES; }
DeleteIdleRoutesStep extends SyncFlowableStep { @Override protected String getStepErrorMessage(ProcessContext context) { return Messages.ERROR_DELETING_IDLE_ROUTES; } }
DeleteIdleRoutesStep extends SyncFlowableStep { @Override protected String getStepErrorMessage(ProcessContext context) { return Messages.ERROR_DELETING_IDLE_ROUTES; } }
DeleteIdleRoutesStep extends SyncFlowableStep { @Override protected String getStepErrorMessage(ProcessContext context) { return Messages.ERROR_DELETING_IDLE_ROUTES; } }
DeleteIdleRoutesStep extends SyncFlowableStep { @Override protected String getStepErrorMessage(ProcessContext context) { return Messages.ERROR_DELETING_IDLE_ROUTES; } }
@Test void testStepWithoutExecuteAction() { context.setVariable(Variables.APP_STATE_ACTIONS_TO_EXECUTE, Collections.emptyList()); AsyncExecutionState resultState = step.execute(context); assertEquals(AsyncExecutionState.FINISHED, resultState); }
@Override public AsyncExecutionState execute(ProcessContext context) { List<ApplicationStateAction> actions = context.getVariable(Variables.APP_STATE_ACTIONS_TO_EXECUTE); if (!actions.contains(ApplicationStateAction.EXECUTE)) { return AsyncExecutionState.FINISHED; } CloudApplication app = getNextApp(context); CloudCont...
PollExecuteAppStatusExecution implements AsyncExecution { @Override public AsyncExecutionState execute(ProcessContext context) { List<ApplicationStateAction> actions = context.getVariable(Variables.APP_STATE_ACTIONS_TO_EXECUTE); if (!actions.contains(ApplicationStateAction.EXECUTE)) { return AsyncExecutionState.FINISHE...
PollExecuteAppStatusExecution implements AsyncExecution { @Override public AsyncExecutionState execute(ProcessContext context) { List<ApplicationStateAction> actions = context.getVariable(Variables.APP_STATE_ACTIONS_TO_EXECUTE); if (!actions.contains(ApplicationStateAction.EXECUTE)) { return AsyncExecutionState.FINISHE...
PollExecuteAppStatusExecution implements AsyncExecution { @Override public AsyncExecutionState execute(ProcessContext context) { List<ApplicationStateAction> actions = context.getVariable(Variables.APP_STATE_ACTIONS_TO_EXECUTE); if (!actions.contains(ApplicationStateAction.EXECUTE)) { return AsyncExecutionState.FINISHE...
PollExecuteAppStatusExecution implements AsyncExecution { @Override public AsyncExecutionState execute(ProcessContext context) { List<ApplicationStateAction> actions = context.getVariable(Variables.APP_STATE_ACTIONS_TO_EXECUTE); if (!actions.contains(ApplicationStateAction.EXECUTE)) { return AsyncExecutionState.FINISHE...
@Test void testGetHookPhaseBefore() { Mockito.when(hooksPhaseBuilder.buildHookPhases(List.of(HookPhase.BEFORE_UNMAP_ROUTES, HookPhase.APPLICATION_BEFORE_UNMAP_ROUTES), context)) .thenReturn(List.of(HookPhase.BLUE_GREEN_APPLICATION_BEFORE_UNMAP_ROUTES_LIVE, HookPhase.APPLICATION_BEFORE_UNMAP_ROUTES)); List<HookPhase> ex...
@Override public List<HookPhase> getHookPhasesBeforeStep(ProcessContext context) { return hooksPhaseBuilder.buildHookPhases(Arrays.asList(HookPhase.BEFORE_UNMAP_ROUTES, HookPhase.APPLICATION_BEFORE_UNMAP_ROUTES), context); }
DeleteApplicationRoutesStep extends UndeployAppStep implements BeforeStepHookPhaseProvider { @Override public List<HookPhase> getHookPhasesBeforeStep(ProcessContext context) { return hooksPhaseBuilder.buildHookPhases(Arrays.asList(HookPhase.BEFORE_UNMAP_ROUTES, HookPhase.APPLICATION_BEFORE_UNMAP_ROUTES), context); } }
DeleteApplicationRoutesStep extends UndeployAppStep implements BeforeStepHookPhaseProvider { @Override public List<HookPhase> getHookPhasesBeforeStep(ProcessContext context) { return hooksPhaseBuilder.buildHookPhases(Arrays.asList(HookPhase.BEFORE_UNMAP_ROUTES, HookPhase.APPLICATION_BEFORE_UNMAP_ROUTES), context); } }
DeleteApplicationRoutesStep extends UndeployAppStep implements BeforeStepHookPhaseProvider { @Override public List<HookPhase> getHookPhasesBeforeStep(ProcessContext context) { return hooksPhaseBuilder.buildHookPhases(Arrays.asList(HookPhase.BEFORE_UNMAP_ROUTES, HookPhase.APPLICATION_BEFORE_UNMAP_ROUTES), context); } @...
DeleteApplicationRoutesStep extends UndeployAppStep implements BeforeStepHookPhaseProvider { @Override public List<HookPhase> getHookPhasesBeforeStep(ProcessContext context) { return hooksPhaseBuilder.buildHookPhases(Arrays.asList(HookPhase.BEFORE_UNMAP_ROUTES, HookPhase.APPLICATION_BEFORE_UNMAP_ROUTES), context); } @...