Skip to content

Commit 6d81538

Browse files
committed
fix tests
1 parent 9983930 commit 6d81538

File tree

1 file changed

+2
-1
lines changed
  • instrumentation/runtime-telemetry/runtime-telemetry-java8/library/src/test/java/io/opentelemetry/instrumentation/runtimemetrics/java8

1 file changed

+2
-1
lines changed

instrumentation/runtime-telemetry/runtime-telemetry-java8/library/src/test/java/io/opentelemetry/instrumentation/runtimemetrics/java8/ThreadsStableSemconvTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import java.util.Set;
2424
import org.junit.jupiter.api.Test;
2525
import org.junit.jupiter.api.condition.EnabledForJreRange;
26+
import org.junit.jupiter.api.condition.EnabledOnJre;
2627
import org.junit.jupiter.api.condition.JRE;
2728
import org.junit.jupiter.api.extension.ExtendWith;
2829
import org.junit.jupiter.api.extension.RegisterExtension;
@@ -42,6 +43,7 @@ class ThreadsStableSemconvTest {
4243
@Mock private ThreadMXBean threadBean;
4344

4445
@Test
46+
@EnabledOnJre(JRE.JAVA_8)
4547
void registerObservers_Java8Jmx() {
4648
when(threadBean.getThreadCount()).thenReturn(7);
4749
when(threadBean.getDaemonThreadCount()).thenReturn(2);
@@ -77,7 +79,6 @@ void registerObservers_Java8Jmx() {
7779
}
7880

7981
@Test
80-
@EnabledForJreRange(min = JRE.JAVA_9)
8182
void registerObservers_Java8Thread() {
8283
Thread threadInfo1 = mock(Thread.class, new ThreadInfoAnswer(false, Thread.State.RUNNABLE));
8384
Thread threadInfo2 = mock(Thread.class, new ThreadInfoAnswer(true, Thread.State.WAITING));

0 commit comments

Comments
 (0)