wzhero1 opened a new pull request, #771:
URL: https://github.com/apache/flink-agents/pull/771

   Linked issue: Closes #770, refs #762
   
   ### Purpose of change
   
   Java `MCPServer` read its connection timeout from the `ResourceDescriptor` 
using the key
   `"timeoutSeconds"`, while the docs, the test, the Python implementation and 
all other
   connections use `"timeout"`. As a result `addInitialArgument("timeout", N)` 
was silently
   ignored and the hard-coded 30s default always applied.
   
   This renames the descriptor/JSON key to `"timeout"` — a single constant in 
`MCPServer.java`,
   which also aligns the Jackson wire key with the Python side. The 
documentation already uses
   `"timeout"` and needs no change.
   
   ### Tests
   
   Added regression test `MCPServerTest#testTimeoutFromResourceDescriptor`: 
builds an `MCPServer`
   from a `ResourceDescriptor` with `timeout=60` and asserts 
`getTimeoutSeconds() == 60` (returns
   `30` before the fix). Verified locally:
   - `mvn -pl integrations/mcp test`: 38/38 pass
   - `spotless:check` on the module: clean
   
   ### API
   
   No public API changes. Only the internal descriptor-argument / JSON key 
string changes; the
   `MCPServer` Java field, the `getTimeoutSeconds()` getter and the default 
value are unchanged.
   
   ### Documentation
   
   - [ ] `doc-needed`
   - [x] `doc-not-needed`
   - [ ] `doc-included`
   


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