@Test public void testLogNullAgenda() { CaptureLogger captureLogger = new CaptureLogger("testLogger"); kubernetesLauncher.setLogger(captureLogger); kubernetesLauncher.logAgendaMetadata(null); String capturedLog = captureLogger.getInfo(); SoftAssertions.assertSoftly(softly -> { softly.assertThat(capturedLog).contains("agenda owner not visible"); softly.assertThat(capturedLog).contains("agendaId not visible"); }); }
protected void logAgendaMetadata(Agenda agenda) { String owner = "agenda owner not visible"; owner = agenda != null && agenda.getCustomerId() != null ? agenda.getCustomerId() : owner; String agendId = "agendaId not visible"; agendId = agenda != null && agenda.getId() != null ? agenda.getId() : agendId; logger.info(String.format(PULLER_AGENDA_METADATA_PATTERN, AGENDA_TYPE, owner, agendId)); }
KubernetesLauncher implements BaseLauncher { protected void logAgendaMetadata(Agenda agenda) { String owner = "agenda owner not visible"; owner = agenda != null && agenda.getCustomerId() != null ? agenda.getCustomerId() : owner; String agendId = "agendaId not visible"; agendId = agenda != null && agenda.getId() != null ? agenda.getId() : agendId; logger.info(String.format(PULLER_AGENDA_METADATA_PATTERN, AGENDA_TYPE, owner, agendId)); } }
KubernetesLauncher implements BaseLauncher { protected void logAgendaMetadata(Agenda agenda) { String owner = "agenda owner not visible"; owner = agenda != null && agenda.getCustomerId() != null ? agenda.getCustomerId() : owner; String agendId = "agendaId not visible"; agendId = agenda != null && agenda.getId() != null ? agenda.getId() : agendId; logger.info(String.format(PULLER_AGENDA_METADATA_PATTERN, AGENDA_TYPE, owner, agendId)); } KubernetesLauncher(KubeConfig kubeConfig, PodConfig podConfig, ExecutionConfig executionConfig, PullerLaunchDataWrapper launchDataWrapper);  KubernetesLauncher(KubeConfig kubeConfig, PodConfig podConfig, ExecutionConfig executionConfig, PullerLaunchDataWrapper launchDataWrapper,
        PodPushClientFactory<CpuRequestModulator> podPushClientFactory, PodFollowerFactory<PodPushClient> podFollowerFactory); }
KubernetesLauncher implements BaseLauncher { protected void logAgendaMetadata(Agenda agenda) { String owner = "agenda owner not visible"; owner = agenda != null && agenda.getCustomerId() != null ? agenda.getCustomerId() : owner; String agendId = "agendaId not visible"; agendId = agenda != null && agenda.getId() != null ? agenda.getId() : agendId; logger.info(String.format(PULLER_AGENDA_METADATA_PATTERN, AGENDA_TYPE, owner, agendId)); } KubernetesLauncher(KubeConfig kubeConfig, PodConfig podConfig, ExecutionConfig executionConfig, PullerLaunchDataWrapper launchDataWrapper);  KubernetesLauncher(KubeConfig kubeConfig, PodConfig podConfig, ExecutionConfig executionConfig, PullerLaunchDataWrapper launchDataWrapper,
        PodPushClientFactory<CpuRequestModulator> podPushClientFactory, PodFollowerFactory<PodPushClient> podFollowerFactory); void setFollower(PodFollower<PodPushClient> follower); void setKubeConfig(KubeConfig kubeConfig); void setPodConfig(PodConfig podConfig); void setExecutionConfig(ExecutionConfig executionConfig); @Override void execute(Agenda agenda, AgendaProgress agendaProgress); }
KubernetesLauncher implements BaseLauncher { protected void logAgendaMetadata(Agenda agenda) { String owner = "agenda owner not visible"; owner = agenda != null && agenda.getCustomerId() != null ? agenda.getCustomerId() : owner; String agendId = "agendaId not visible"; agendId = agenda != null && agenda.getId() != null ? agenda.getId() : agendId; logger.info(String.format(PULLER_AGENDA_METADATA_PATTERN, AGENDA_TYPE, owner, agendId)); } KubernetesLauncher(KubeConfig kubeConfig, PodConfig podConfig, ExecutionConfig executionConfig, PullerLaunchDataWrapper launchDataWrapper);  KubernetesLauncher(KubeConfig kubeConfig, PodConfig podConfig, ExecutionConfig executionConfig, PullerLaunchDataWrapper launchDataWrapper,
        PodPushClientFactory<CpuRequestModulator> podPushClientFactory, PodFollowerFactory<PodPushClient> podFollowerFactory); void setFollower(PodFollower<PodPushClient> follower); void setKubeConfig(KubeConfig kubeConfig); void setPodConfig(PodConfig podConfig); void setExecutionConfig(ExecutionConfig executionConfig); @Override void execute(Agenda agenda, AgendaProgress agendaProgress);  }