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);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]