@Test(expected = IOException.class) public void slackIOExceptionTest () throws IOException { try { responseCode = 500; slackNotifications.sendNotification(chaosExperimentEvent); } finally { responseCode = 200; } }
@Override protected void sendNotification (ChaosNotification chaosNotification) throws IOException { SlackMessage slackMessage = SlackMessage.builder() .withAttachment(createAttachmentFromChaosNotification(chaosNotification)) .build(); sendSlackMessage(slackMessage); }
SlackNotifications extends BufferedNotificationMethod { @Override protected void sendNotification (ChaosNotification chaosNotification) throws IOException { SlackMessage slackMessage = SlackMessage.builder() .withAttachment(createAttachmentFromChaosNotification(chaosNotification)) .build(); sendSlackMessage(slackMessage); } }
SlackNotifications extends BufferedNotificationMethod { @Override protected void sendNotification (ChaosNotification chaosNotification) throws IOException { SlackMessage slackMessage = SlackMessage.builder() .withAttachment(createAttachmentFromChaosNotification(chaosNotification)) .build(); sendSlackMessage(slackMessage); } @Autowired  SlackNotifications(@Value("${slack_webhookuri}") @NotNull String webhookUri); }
SlackNotifications extends BufferedNotificationMethod { @Override protected void sendNotification (ChaosNotification chaosNotification) throws IOException { SlackMessage slackMessage = SlackMessage.builder() .withAttachment(createAttachmentFromChaosNotification(chaosNotification)) .build(); sendSlackMessage(slackMessage); } @Autowired  SlackNotifications(@Value("${slack_webhookuri}") @NotNull String webhookUri); @Override void logNotification(ChaosNotification notification); }
SlackNotifications extends BufferedNotificationMethod { @Override protected void sendNotification (ChaosNotification chaosNotification) throws IOException { SlackMessage slackMessage = SlackMessage.builder() .withAttachment(createAttachmentFromChaosNotification(chaosNotification)) .build(); sendSlackMessage(slackMessage); } @Autowired  SlackNotifications(@Value("${slack_webhookuri}") @NotNull String webhookUri); @Override void logNotification(ChaosNotification notification);  }