Skip to content

Conversation

alxkm
Copy link
Contributor

@alxkm alxkm commented Aug 14, 2025

Enhance test coverage for EmbeddingModelObservationContext class by adding validation tests for the builder pattern.

Changes

  • Added comprehensive validation tests for builder input parameters
  • Enhanced coverage of error handling scenarios
  • Verified proper exception handling with specific error messages
  • Improved overall test robustness for the observation context

Test Coverage Enhanced

  • Builder validation for required fields (request, provider)
  • Null input validation with proper exception types
  • Empty/invalid input handling
  • Successful builder construction scenarios

Improvements

All new tests verify expected behavior with proper error messages and exception types, ensuring reliable error handling and clear debugging information.

alxkm added 2 commits August 14, 2025 23:14
Co-authored-by: Oleksandr Klymenko <alexanderklmn@gmail.com> Signed-off-by: Oleksandr Klymenko <alexanderklmn@gmail.com>
Co-authored-by: Oleksandr Klymenko <alexanderklmn@gmail.com> Signed-off-by: Oleksandr Klymenko <alexanderklmn@gmail.com>
@sobychacko sobychacko added this to the 1.1.0.M1 milestone Aug 15, 2025
@sobychacko sobychacko merged commit a376869 into spring-projects:main Aug 15, 2025
2 checks passed
scionaltera pushed a commit to scionaltera/spring-ai that referenced this pull request Sep 3, 2025
…pring-projects#4157) * test: Enhance test coverage for EmbeddingModelObservationContext Signed-off-by: Oleksandr Klymenko <alexanderklmn@gmail.com>
chedim pushed a commit to couchbaselabs/spring-ai that referenced this pull request Sep 19, 2025
…pring-projects#4157) * test: Enhance test coverage for EmbeddingModelObservationContext Signed-off-by: Oleksandr Klymenko <alexanderklmn@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants