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

   ## Summary
   
   `GetRunningStateITCase.testGetProperties` fails on main because the KEY 
column in
   `camel get properties` output uses `OverflowBehaviour.ELLIPSIS_RIGHT` with a 
minimum
   width of 15 characters. In CI/piped output environments `DEFAULT_WIDTH=120` 
is used
   (no real terminal), but the fixed columns (PID + NAME + LOCATION + VALUE) 
already
   consume more than 120 characters, leaving only 15 chars for KEY. Property 
keys longer
   than 14 chars (e.g. `test.jbang.marker` = 16 chars) are silently truncated to
   `test.jbang.m?`, causing the string assertion to fail.
   
   ## Root Cause
   
   The KEY column was configured with `OverflowBehaviour.ELLIPSIS_RIGHT`:
   
   ```java
   new Column().header("KEY").dataAlign(HorizontalAlign.LEFT)
       .maxWidth(keyW, OverflowBehaviour.ELLIPSIS_RIGHT)
       .with(r -> r.key),
   ```
   
   When `keyW` resolves to `MIN_WIDTH` (15) due to the total column budget 
exceeding the
   terminal width, `ELLIPSIS_RIGHT` truncates any key longer than 14 chars. The 
VALUE
   and LOCATION columns already use `OverflowBehaviour.NEWLINE` for the same 
reason.
   
   ## Fix
   
   Change the KEY column overflow from `ELLIPSIS_RIGHT` to `NEWLINE`, 
consistent with
   LOCATION and VALUE, so long keys wrap to the next line rather than being 
silently
   truncated.
   
   ```java
   new Column().header("KEY").dataAlign(HorizontalAlign.LEFT)
       .maxWidth(keyW, OverflowBehaviour.NEWLINE)
       .with(r -> r.key),
   ```
   
   ## Tests
   
   `GetRunningStateITCase.testGetProperties` — the existing integration test 
asserts that
   the full property key `test.jbang.marker` appears in `camel get properties` 
output.
   This test was the failing canary; it should now pass consistently.
   
   Fixes CAMEL-27769.
   
   ---
   _Hermes Agent (Claude Sonnet 4.6) on behalf of Guillaume Nodet_
   


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