Fix flaky micrometer test (#5514)
This commit is contained in:
parent
9ed35fd286
commit
3c11cd44a0
|
@ -118,10 +118,11 @@ public abstract class AbstractLongTaskTimerSecondsTest {
|
||||||
.hasValue(0)
|
.hasValue(0)
|
||||||
.attributes()
|
.attributes()
|
||||||
.containsOnly(attributeEntry("tag", "value")))));
|
.containsOnly(attributeEntry("tag", "value")))));
|
||||||
testing().clearData();
|
|
||||||
|
|
||||||
// when timer is removed from the registry
|
// when timer is removed from the registry
|
||||||
Metrics.globalRegistry.remove(timer);
|
Metrics.globalRegistry.remove(timer);
|
||||||
|
Thread.sleep(10); // give time for any in flight metric export to be received
|
||||||
|
testing().clearData();
|
||||||
timer.start();
|
timer.start();
|
||||||
|
|
||||||
// then no tasks are active after starting a new sample
|
// then no tasks are active after starting a new sample
|
||||||
|
|
Loading…
Reference in New Issue