@Test public void testLogIntegrationNotReady() throws InterruptedException { integrationLogging.logIntegration(integration); assertEquals(1, queue.size()); assertEquals(integration, queue.poll()); }
public void logIntegration(Integration integration) { if (ready.get()) { logIntegrationHealthCheck(integration); } else { try { queue.offer(integration, 10, TimeUnit.SECONDS); } catch (InterruptedException e) { LOGGER.error( logMessage.getMessage(FAIL_TO_ADD_INTEGRATION_ON_QUEUE, integration.getSettings().getName()), e); } } }
IntegrationLogging { public void logIntegration(Integration integration) { if (ready.get()) { logIntegrationHealthCheck(integration); } else { try { queue.offer(integration, 10, TimeUnit.SECONDS); } catch (InterruptedException e) { LOGGER.error( logMessage.getMessage(FAIL_TO_ADD_INTEGRATION_ON_QUEUE, integration.getSettings().getName()), e); } } } }
IntegrationLogging { public void logIntegration(Integration integration) { if (ready.get()) { logIntegrationHealthCheck(integration); } else { try { queue.offer(integration, 10, TimeUnit.SECONDS); } catch (InterruptedException e) { LOGGER.error( logMessage.getMessage(FAIL_TO_ADD_INTEGRATION_ON_QUEUE, integration.getSettings().getName()), e); } } }  }
IntegrationLogging { public void logIntegration(Integration integration) { if (ready.get()) { logIntegrationHealthCheck(integration); } else { try { queue.offer(integration, 10, TimeUnit.SECONDS); } catch (InterruptedException e) { LOGGER.error( logMessage.getMessage(FAIL_TO_ADD_INTEGRATION_ON_QUEUE, integration.getSettings().getName()), e); } } }  void logIntegration(Integration integration); void logHealth(); void ready(); }
IntegrationLogging { public void logIntegration(Integration integration) { if (ready.get()) { logIntegrationHealthCheck(integration); } else { try { queue.offer(integration, 10, TimeUnit.SECONDS); } catch (InterruptedException e) { LOGGER.error( logMessage.getMessage(FAIL_TO_ADD_INTEGRATION_ON_QUEUE, integration.getSettings().getName()), e); } } }  void logIntegration(Integration integration); void logHealth(); void ready();  }