diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 059e235..40645d9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: fail-fast: false matrix: os: [ubuntu, macos] - java: ['8', '11', '17'] + java: ['8', '11', '17', '21'] steps: - uses: actions/checkout@v2 - name: Set up JDK @@ -26,4 +26,4 @@ jobs: - name: Test with Gradle uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7 with: - arguments: test + arguments: test --stacktrace diff --git a/agent/src/test/java/io/pyroscope/javaagent/PyroscopeAgentTest.java b/agent/src/test/java/io/pyroscope/javaagent/PyroscopeAgentTest.java index 15fcda3..c071394 100644 --- a/agent/src/test/java/io/pyroscope/javaagent/PyroscopeAgentTest.java +++ b/agent/src/test/java/io/pyroscope/javaagent/PyroscopeAgentTest.java @@ -3,6 +3,7 @@ import io.pyroscope.javaagent.api.Logger; import io.pyroscope.javaagent.api.ProfilingScheduler; import io.pyroscope.javaagent.config.Config; +import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -45,6 +46,11 @@ void setUp() { .build(); } + @AfterEach + void tearDown() { + PyroscopeAgent.stop(); + } + @Test void startupTestWithEnabledAgent() { PyroscopeAgent.start(optionsAgentEnabled);