From 26867add15f3296b23e3853c002892865c91cdb3 Mon Sep 17 00:00:00 2001 From: Nick Molcanov <32801560+nck-mlcnv@users.noreply.github.com> Date: Fri, 5 Jul 2024 12:30:06 +0200 Subject: [PATCH] Attempt to fix something 7 --- .github/workflows/tests.yml | 6 +----- .../iguana/cc/worker/impl/SPARQLProtocolWorkerTest.java | 8 +++++++- 2 files changed, 8 insertions(+), 6 deletions(-) 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");