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

   Linked issue: N/A - hotfix that only adds tests, no behavior change.
   
   ### Purpose of change
   
   The four string parsers below are the entry points for user-supplied 
configuration (YAML agent definitions, `EventLoggerConfig`, resource 
descriptors, chat message deserialization), but none of them had test coverage:
   
   - `EventLogLevel.fromString`
   - `LoggerType.fromType`
   - `ResourceType.fromValue`
   - `MessageRole.fromValue` (the `@JsonCreator` Jackson uses to deserialize 
messages)
   
   This adds 18 focused cases pinning the behavior callers already depend on: 
case-insensitive resolution, trimming of surrounding whitespace, round-tripping 
of every declared constant, and the `IllegalArgumentException` raised for null 
or unknown input together with the message the caller sees. No production code 
is changed.
   
   ### Tests
   
   `mvn -pl api -am 
-Dtest=EventLogLevelTest,LoggerTypeTest,ResourceTypeTest,MessageRoleTest 
-Dsurefire.failIfNoSpecifiedTests=false test` -> 18 tests run, 0 failures, 0 
errors. `mvn -pl api spotless:check` passes.
   
   | Test class | Cases |
   |---|---|
   | `EventLogLevelTest` | 4 |
   | `LoggerTypeTest` | 5 |
   | `ResourceTypeTest` | 4 |
   | `MessageRoleTest` | 5 |
   
   ### API
   
   No public API is added, removed, or changed.
   
   ### Documentation
   
   - [ ] `doc-needed`
   - [x] `doc-not-needed`
   - [ ] `doc-included`
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   - [x] Yes
   - [ ] No
   
   Generated-by: CodeBuddy (Auto)
   


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