gnodet opened a new pull request, #29135:
URL: https://github.com/apache/camel/pull/29135
## Summary
Fixes two bugs in `JolokiaITCase.testRunHawtio` that caused spurious CI
failures.
### Bug 1 — `CliService.executeNohup()` does not capture the process PID
The default implementation in `CliService`:
Before (broken): nohup output is returned but no PID is printed
`executeGenericCommand("nohup " + getMainCommand() + " " + command + "
&");`
The command never printed `$!`, so `executeNohup()` always returned an empty
or noise string. As a result `JolokiaITCase.hawtioPid` was never set, and the
`@AfterEach` cleanup never killed the hawtio process. This could leave hawtio
running between tests and cause port-8888 conflicts on the next run.
Fix: redirect nohup output to `/dev/null` and append `echo $!` so the PID is
returned and can be used for cleanup:
`executeGenericCommand("nohup " + getMainCommand() + " " + command + " >
/dev/null 2>&1 & echo $!")`
`CliLocalProcessService` already overrides `executeNohup()` with the correct
pattern (using `echo $!`) so it is unaffected.
### Bug 2 — Awaitility timeout too short for hawtio startup on CI
The 30-second timeout in `testRunHawtio` is insufficient on CI where Maven
artifact downloads, WAR extraction and embedded Jetty startup can easily take
longer. The timeout is increased to 120 seconds, and the poll interval is
bumped to 2 seconds to reduce polling overhead.
## Jira
https://issues.apache.org/jira/browse/CAMEL-26529
## Testing
- Both modified modules compile cleanly (`mvnw formatter:validate
impsort:check` passes).
- `CliLocalProcessService.executeNohup()` is unaffected (it already uses
`echo $!`).
- The fix is in the test-infra layer only; no production code changed.
---
_This PR was prepared by Hermes Agent on behalf of gnodet._
--
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]