This is an automated email from the ASF dual-hosted git repository.

tilman pushed a commit to branch TIKA-4704-9
in repository https://gitbox.apache.org/repos/asf/tika.git

commit 9364486100b651a3955617784c554f935310f836
Author: Tilman Hausherr <[email protected]>
AuthorDate: Sun Apr 5 15:47:16 2026 +0200

    [TIKA-4704] use JUnit tempdir; improve logging
---
 .../test/java/org/apache/tika/server/core/IntegrationTestBase.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git 
a/tika-server/tika-server-core/src/test/java/org/apache/tika/server/core/IntegrationTestBase.java
 
b/tika-server/tika-server-core/src/test/java/org/apache/tika/server/core/IntegrationTestBase.java
index a4f48b89ba..079e37a012 100644
--- 
a/tika-server/tika-server-core/src/test/java/org/apache/tika/server/core/IntegrationTestBase.java
+++ 
b/tika-server/tika-server-core/src/test/java/org/apache/tika/server/core/IntegrationTestBase.java
@@ -75,11 +75,14 @@ public class IntegrationTestBase extends TikaTest {
     @AfterEach
     public void tearDown() throws Exception {
         if (process != null) {
+            LOG.info("Trying graceful shutdown; supported? {}", 
process.supportsNormalTermination());
             // Try graceful shutdown first (SIGTERM) to allow shutdown hooks 
to run
             process.destroy();
             boolean exited = process.waitFor(5, TimeUnit.SECONDS);
+            LOG.info("Trying graceful shutdown successful? {}", exited);
             if (!exited) {
                 // Fall back to forceful shutdown (SIGKILL)
+                LOG.warn("Fall back to forceful shutdown");
                 process.destroyForcibly();
                 process.waitFor(30, TimeUnit.SECONDS);
             }
@@ -90,7 +93,9 @@ public class IntegrationTestBase extends TikaTest {
     }
 
     public void startProcess(String[] extraArgs) throws IOException {
-        String[] base = new String[]{"java", "-cp", 
System.getProperty("java.class.path"), 
"org.apache.tika.server.core.TikaServerCli",
+        String[] base = new String[]{"java", 
+                "-Djava.io.tmpdir=" + TEMP_WORKING_DIR.toAbsolutePath(), // 
make sure we're using subdir cleaned up by JUnit
+                "-cp", System.getProperty("java.class.path"), 
"org.apache.tika.server.core.TikaServerCli",
                 "-p", INTEGRATION_TEST_PORT};
         List<String> args = new ArrayList<>(Arrays.asList(base));
         args.addAll(Arrays.asList(extraArgs));

Reply via email to