use of io.quarkus.runtime.ShutdownEvent in project jobrunr by jobrunr.
the class JobRunrStarterTest method jobRunrStarterDoesNotStopsDashboardIfNotConfigured.
@Test
void jobRunrStarterDoesNotStopsDashboardIfNotConfigured() {
dashboardConfiguration.enabled = false;
jobRunrStarter.shutdown(new ShutdownEvent());
verify(dashboardWebServerInstance, never()).get();
}
use of io.quarkus.runtime.ShutdownEvent in project jobrunr by jobrunr.
the class JobRunrStarterTest method jobRunrStarterStopsDashboardIfConfigured.
@Test
void jobRunrStarterStopsDashboardIfConfigured() {
dashboardConfiguration.enabled = true;
jobRunrStarter.shutdown(new ShutdownEvent());
verify(dashboardWebServer).stop();
}
use of io.quarkus.runtime.ShutdownEvent in project quarkus by quarkusio.
the class KafkaEventObserverTest method testAllKafkaClientMetricsClosed.
@Test
void testAllKafkaClientMetricsClosed() {
KafkaEventObserver sut = new KafkaEventObserver();
KafkaClientMetrics firstClientMetrics = Mockito.mock(KafkaClientMetrics.class);
KafkaClientMetrics secondClientMetrics = Mockito.mock(KafkaClientMetrics.class);
sut.clientMetrics.put(firstClientMetrics, firstClientMetrics);
sut.clientMetrics.put(secondClientMetrics, secondClientMetrics);
sut.onStop(new ShutdownEvent());
Mockito.verify(firstClientMetrics).close();
Mockito.verify(secondClientMetrics).close();
}
use of io.quarkus.runtime.ShutdownEvent in project quarkus by quarkusio.
the class KafkaStreamsEventObserverTest method testKafkaStreamsMetricsClosedAfterShutdownEvent.
@Test
void testKafkaStreamsMetricsClosedAfterShutdownEvent() {
KafkaStreamsEventObserver sut = new KafkaStreamsEventObserver();
sut.kafkaStreamsMetrics = Mockito.mock(KafkaStreamsMetrics.class);
sut.onStop(new ShutdownEvent());
Mockito.verify(sut.kafkaStreamsMetrics).close();
}
use of io.quarkus.runtime.ShutdownEvent in project jobrunr by jobrunr.
the class JobRunrStarterTest method jobRunrStarterDoesNotStopBackgroundJobServerIfNotConfigured.
@Test
void jobRunrStarterDoesNotStopBackgroundJobServerIfNotConfigured() {
backgroundJobServerConfiguration.enabled = false;
jobRunrStarter.shutdown(new ShutdownEvent());
verify(backgroundJobServerInstance, never()).get();
}
Aggregations