Skip to content

test: improve coverage PgVectorEmbeddingDimensionsTests #3907

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

alxkm
Copy link
Contributor

@alxkm alxkm commented Jul 24, 2025

Enhances PgVectorEmbeddingDimensionsTests with additional test cases covering edge scenarios:

  • Embedding model returning zero/negative dimensions
  • Explicitly setting zero/negative dimensions via builder
  • Improved test structure with Given-When-Then comments

Ensures all code paths in embeddingDimensions() method are properly tested.

@alxkm alxkm force-pushed the test/PgVectorEmbeddingDimensionsTests branch from e4d965f to 7f1ce23 Compare July 24, 2025 17:24
@ilayaperumalg ilayaperumalg self-assigned this Jul 25, 2025
@ilayaperumalg ilayaperumalg added this to the 1.1.0.M1 milestone Jul 25, 2025
@ilayaperumalg
Copy link
Member

@alxkm Thanks for the PR improving the test coverage.

@@ -404,7 +404,7 @@ public Builder topK(Integer topK) {
return this;
}

public Builder frequencePenalty(Double frequencyPenalty) {
public Builder frequencyPenalty(Double frequencyPenalty) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is recently fixed via 128c45a

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for letting me know! I see that commit 128c45a addressed some of the issues.

However, this PR is specifically focused on improving test coverage for the PgVectorEmbeddingDimensionsTests class

I've cleaned up the branch to remove any unrelated commits and now it only contains the test improvements.

@alxkm alxkm force-pushed the test/PgVectorEmbeddingDimensionsTests branch from 38463e2 to 56f65c3 Compare July 25, 2025 12:01
@alxkm alxkm requested a review from ilayaperumalg July 25, 2025 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants