We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d73e341 commit a5fe903Copy full SHA for a5fe903
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