|
|
|
@ -60,9 +60,10 @@ public class MetricCopyExporterTests {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
public void counterWithGaugeWriter() {
|
|
|
|
|
public void counterWithGaugeWriter() throws Exception {
|
|
|
|
|
SimpleGaugeWriter writer = new SimpleGaugeWriter();
|
|
|
|
|
MetricCopyExporter exporter = new MetricCopyExporter(this.reader, writer);
|
|
|
|
|
try {
|
|
|
|
|
this.reader.increment(new Delta<Number>("counter.foo", 2));
|
|
|
|
|
exporter.export();
|
|
|
|
|
this.reader.increment(new Delta<Number>("counter.foo", 3));
|
|
|
|
@ -70,6 +71,10 @@ public class MetricCopyExporterTests {
|
|
|
|
|
exporter.flush();
|
|
|
|
|
assertThat(writer.getValue().getValue()).isEqualTo(5L);
|
|
|
|
|
}
|
|
|
|
|
finally {
|
|
|
|
|
exporter.close();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
public void exportIncludes() {
|
|
|
|
|