diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3225359d..400e0a52 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -27,11 +27,7 @@ jobs: key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} restore-keys: ${{ runner.os }}-m2 - name: Testing the Java code - run: mvn package & { sleep 20; jstack -l -e $(jps | grep surefire | awk -F ' ' '{print $1}') > jstack.log; } - - uses: actions/upload-artifact@v4 - with: - name: thread-dump - path: jstack.log + run: mvn package # Only run for pull request on main or if pushed to develop compile_native: diff --git a/src/test/java/org/aksw/iguana/cc/worker/impl/SPARQLProtocolWorkerTest.java b/src/test/java/org/aksw/iguana/cc/worker/impl/SPARQLProtocolWorkerTest.java index c53845d5..547a93d5 100644 --- a/src/test/java/org/aksw/iguana/cc/worker/impl/SPARQLProtocolWorkerTest.java +++ b/src/test/java/org/aksw/iguana/cc/worker/impl/SPARQLProtocolWorkerTest.java @@ -69,11 +69,11 @@ public class SPARQLProtocolWorkerTest { public static void setup() throws IOException { queryFile = Files.createTempFile("iguana-test-queries", ".tmp"); Files.writeString(queryFile, QUERY, StandardCharsets.UTF_8); - SPARQLProtocolWorker.initHttpClient(1); } @BeforeEach public void reset() { + SPARQLProtocolWorker.initHttpClient(1); wm.resetMappings(); // reset stubbing maps after each test } @@ -83,6 +83,12 @@ public static void cleanup() throws IOException { SPARQLProtocolWorker.closeHttpClient(); } + @AfterEach + public void verify() { + wm.resetAll(); + SPARQLProtocolWorker.closeHttpClient(); + } + public static Stream requestFactoryData() throws URISyntaxException { final var uri = new URI("http://localhost:" + wm.getPort() + "/ds/query");