use of io.jaegertracing.spi.SamplingManager in project jaeger-client-java by jaegertracing.
the class RemoteControlledSamplerTest method testUpdateFailureKeepsTimerRunning.
@Test
public void testUpdateFailureKeepsTimerRunning() throws InterruptedException {
undertest.close();
CountDownLatch latch = new CountDownLatch(3);
SamplingManager failingManager = serviceName -> {
latch.countDown();
throw new RuntimeException("test update failure");
};
undertest = new RemoteControlledSampler.Builder(SERVICE_NAME).withSamplingManager(failingManager).withInitialSampler(initialSampler).withMetrics(metrics).withPollingInterval(1).build();
assertTrue(latch.await(1, TimeUnit.SECONDS));
}
Aggregations