You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: Add comprehensive edge case and validation tests for runtime hints registration (#4028)
Adds 4 targeted test cases to strengthen runtime hints functionality across multiple components:
- ToolRuntimeHintsTests:
Null ClassLoader handling - Ensures tool hints registration doesn't fail when ClassLoader parameter is null (common in AOT processing)
- AiRuntimeHintsTests:
Record validation - Confirms records with @JsonProperty parameters are properly discovered for hint registration
Enum validation - Verifies enums with @JsonInclude annotations are correctly identified for reflection hints
- JdbcChatMemoryRepositoryRuntimeHintsTest:
Null ClassLoader robustness - Validates JDBC chat memory hints registration handles null ClassLoader gracefully
These tests prevent runtime failures in native images by ensuring proper discovery of JSON-annotated classes (records/enums), robust hint registration under various ClassLoader conditions, and reliable chat memory persistence in GraalVM environments.
Signed-off-by: Alex Klimenko <[email protected]>
Copy file name to clipboardExpand all lines: memory/repository/spring-ai-model-chat-memory-repository-jdbc/src/test/java/org/springframework/ai/chat/memory/repository/jdbc/aot/hint/JdbcChatMemoryRepositoryRuntimeHintsTest.java
0 commit comments