Skip to content

Conversation

alxkm
Copy link
Contributor

@alxkm alxkm commented Sep 25, 2025

Description

This PR adds missing test coverage for several core classes in the Spring AI framework, improving test reliability and catching potential edge cases.

Changes

MultiQueryExpanderTests

  • Added test to verify that builder throws IllegalArgumentException when chatClientBuilder is null
  • Added test to verify default prompt template is used when null is provided

StreamHelperTests

  • Added test for ping event handling to ensure proper response generation from ping events
  • Validates that eventToChatCompletionResponse correctly processes AnthropicApi.PingEvent

QueryTests

  • Added test to verify inequality when comparing Query to different types (String)
  • Added test to validate toString() format includes class name and text content

… and Query classes

Co-authored-by: Oleksandr Klymenko <[email protected]>
Signed-off-by: Oleksandr Klymenko <[email protected]>
Co-authored-by: Oleksandr Klymenko <[email protected]>
Signed-off-by: Oleksandr Klymenko <[email protected]>
@ilayaperumalg
Copy link
Member

@alxkm Thanks for the PR!

@ilayaperumalg ilayaperumalg added this to the 1.1.0.M3 milestone Sep 26, 2025
@ilayaperumalg ilayaperumalg merged commit 92ec7e9 into spring-projects:main Sep 26, 2025
2 checks passed
Willam2004 pushed a commit to Willam2004/spring-ai that referenced this pull request Oct 11, 2025
…r, and Query classes (spring-projects#4473)

* test: Add missing test coverage for MultiQueryExpander, StreamHelper, and Query classes

Co-authored-by: Oleksandr Klymenko <[email protected]>
Signed-off-by: Oleksandr Klymenko <[email protected]>
Signed-off-by: 家娃 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants