We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6e70957 + a5fe903 commit 0d6bcecCopy full SHA for 0d6bcec
micrometer-core/src/test/java/io/micrometer/core/instrument/binder/jvm/JvmGcMetricsTest.java
@@ -104,6 +104,10 @@ void gcMetricsAvailableAfterGc() {
104
// in an LTS is 17
105
@EnabledForJreRange(min = JRE.JAVA_17)
106
void gcTimingIsCorrectForPauseCycleCollectors() {
107
+ // Try to reduce chances for GCs to happen between collecting initial values and
108
+ // binding metrics.
109
+ System.gc();
110
+
111
// get initial GC timing metrics from JMX, if any
112
// GC could have happened before this test due to testing infrastructure
113
// If it did, it will not be captured in the metrics
0 commit comments