davsclaus opened a new pull request, #29739:
URL: https://github.com/apache/camel/pull/29739

   ## Description
   
   Fixes two flaky tests in `camel-jbang-plugin-tui`. In both, a test changed 
state that tests running in parallel depend on.
   
   **[CAMEL-26405](https://issues.apache.org/jira/browse/CAMEL-26405): 
`LaunchManagerOutcomeTest`** failed with `expected: null but was: 
LaunchOutcome[ok=false, log=null]`.
   - `LaunchManagerInfraTest` cleaned up by destroying every `sleep` and `sh` 
child of the test JVM, so it also killed the `sleep 30` of 
`LaunchManagerOutcomeTest` when the two ran in parallel. A launch that dies 
before it starts, with no log file, gives exactly that outcome. It could also 
kill the `sh` processes of other tests, such as `AcpAgentClientTest`.
   - `LaunchManager.launchInfra` now returns the process it starts 
(package-private, and its one caller ignores the return value). The infra test 
keeps its processes and stops only those in `@AfterEach`.
   
   **[CAMEL-26406](https://issues.apache.org/jira/browse/CAMEL-26406): 
`TuiShellHistorySupportTest`** failed with `DirectoryNotEmptyException` on its 
temp dir and its `.camel` folder.
   - The test points the global CLI home to its `@TempDir` but was not 
`@Isolated`, so tests running in parallel wrote into that `.camel` folder while 
JUnit deleted it.
   - It is now `@Isolated`, like the 18 other tests in the module that move the 
home directory.
   - `AiPanelTest.modelCommandPersistsSelectionAcrossRestarts` moved the home 
directory the same way. Rather than isolate all 82 tests of `AiPanelTest`, that 
one test moved to a new `@Isolated` class, `AiPanelModelPersistenceTest`.
   
   ## Testing
   
   `LaunchManagerInfraTest`, `LaunchManagerOutcomeTest`, 
`TuiShellHistorySupportTest`, `AiPanelTest`, `AiPanelModelPersistenceTest` and 
`AcpAgentClientTest` pass locally (114 tests), and no `sleep` processes are 
left running afterwards. I did not run the full module suite locally.
   
   _Claude Code on behalf of davsclaus_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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]

Reply via email to