[ 
https://issues.apache.org/jira/browse/TIKA-4704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18071224#comment-18071224
 ] 

ASF GitHub Bot commented on TIKA-4704:
--------------------------------------

Copilot commented on code in PR #2734:
URL: https://github.com/apache/tika/pull/2734#discussion_r3036887508


##########
tika-server/tika-server-core/src/test/java/org/apache/tika/server/core/IntegrationTestBase.java:
##########
@@ -75,11 +75,14 @@ public static void staticSetup() throws Exception {
     @AfterEach
     public void tearDown() throws Exception {
         if (process != null) {
+            LOG.info("Trying graceful shutdown; supported? {}", 
process.supportsNormalTermination());

Review Comment:
   `Process#supportsNormalTermination()` is not available on Java 17 (it exists 
on `ProcessHandle`). This will fail to compile against the project's configured 
`maven.compiler.release` (17). Use 
`process.toHandle().supportsNormalTermination()` (or drop this log line) 
instead.
   ```suggestion
               LOG.info("Trying graceful shutdown; supported? {}",
                       process.toHandle().supportsNormalTermination());
   ```



##########
tika-server/tika-server-core/src/test/java/org/apache/tika/server/core/IntegrationTestBase.java:
##########
@@ -75,11 +75,14 @@ public static void staticSetup() throws Exception {
     @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);

Review Comment:
   Log message grammar is a bit awkward ("Trying graceful shutdown 
successful?"). Consider rephrasing to something like "Graceful shutdown 
succeeded: {}" for clearer test logs.
   ```suggestion
               LOG.info("Graceful shutdown succeeded: {}", exited);
   ```





> Avoid remaining temp files
> --------------------------
>
>                 Key: TIKA-4704
>                 URL: https://issues.apache.org/jira/browse/TIKA-4704
>             Project: Tika
>          Issue Type: Task
>    Affects Versions: 3.3.0
>            Reporter: Tilman Hausherr
>            Priority: Minor
>             Fix For: 4.0.0, 3.3.1
>
>         Attachments: screenshot-1.png
>
>
> This is my temp directory after a successful build of tika 3. We should try 
> to lessen this.
>  !screenshot-1.png! 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to