This is an automated email from the ASF dual-hosted git repository.
tilman pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tika.git
The following commit(s) were added to refs/heads/main by this push:
new 58476970d2 [TIKA-4704] pass JUnit tempdir; improve logging (#2734)
58476970d2 is described below
commit 58476970d22925bbec07a50ce3dbed8238e35df6
Author: Tilman Hausherr <[email protected]>
AuthorDate: Sun Apr 5 16:45:49 2026 +0200
[TIKA-4704] pass JUnit tempdir; improve logging (#2734)
* [TIKA-4704] use JUnit tempdir; improve logging
* Update
tika-server/tika-server-core/src/test/java/org/apache/tika/server/core/IntegrationTestBase.java
Co-authored-by: Copilot <[email protected]>
* Update
tika-server/tika-server-core/src/test/java/org/apache/tika/server/core/IntegrationTestBase.java
Co-authored-by: Copilot <[email protected]>
---------
Co-authored-by: Copilot <[email protected]>
---
.../java/org/apache/tika/server/core/IntegrationTestBase.java | 8 +++++++-
1 file changed, 7 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..2299a65f6a 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,15 @@ public class IntegrationTestBase extends TikaTest {
@AfterEach
public void tearDown() throws Exception {
if (process != null) {
+ LOG.info("Trying graceful shutdown; supported? {}",
+ process.toHandle().supportsNormalTermination());
// Try graceful shutdown first (SIGTERM) to allow shutdown hooks
to run
process.destroy();
boolean exited = process.waitFor(5, TimeUnit.SECONDS);
+ LOG.info("Graceful shutdown succeeded: {}", 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 +94,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));