Skip to content

Conversation

@rozza
Copy link
Member

@rozza rozza commented Oct 9, 2025

Moved specifications submodule out of driver-core into a testing directory.
Deleted old copy of bson specification tests and updated to use the submodule
Fixed Json output for positive exponents to match the the extended json specification

Added test exceptions to BinaryVectorGenericBsonTest
Added BsonBinaryVector prose tests
Added extra regression tests to ensure both explicit and implicit doubles with positive exponets parse as expected.

JAVA-5877
JAVA-5779
JAVA-5782
JAVA-5652

@rozza rozza requested a review from vbabanin October 9, 2025 10:51
@rozza rozza requested a review from a team as a code owner October 9, 2025 10:51
@rozza rozza requested a review from Copilot October 9, 2025 10:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR reorganizes specification testing by moving the MongoDB specifications submodule from driver-core to a shared testing directory, updates JSON output for positive exponents to match the extended JSON specification, and adds comprehensive testing for BsonBinaryVector functionality.

  • Moved specifications submodule from driver-core to shared testing directory for better organization
  • Fixed JSON output to include explicit "+" signs for positive exponents in extended JSON
  • Added comprehensive testing for BsonBinaryVector including prose tests and enhanced validation

Reviewed Changes

Copilot reviewed 47 out of 49 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
.gitmodules Updated submodule path from driver-core to testing directory
bson/build.gradle.kts Added test resource processing to include shared testing resources
driver-core/build.gradle.kts Added test resource processing to include shared testing resources
bson/src/main/org/bson/json/*.java Modified double converters to use consistent JSON formatting with explicit positive exponents
bson/src/main/org/bson/BinaryVector.java Added validation logging for non-zero padding bits
bson/src/test/unit/org/bson/vector/BinaryVectorGenericBsonTest.java Enhanced test coverage and updated to use new spec test location
bson/src/test/unit/org/bson/*.java Updated test references to use new specification test helper method
bson/src/test/resources/bson*/ Removed old BSON specification test files (now using submodule)

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

}

tasks.processTestResources {
from("${rootProject.projectDir}/testing/resources")
Copy link
Member

Choose a reason for hiding this comment

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

Nice! I think, In the future, we could also consider creating a separate module for testing utilities, so shared helpers can be reused across sync, reactive, core, and BSON modules.

@rozza
Copy link
Member Author

rozza commented Oct 21, 2025

@vbabanin I've updated the names of the tests to be more inline with the spec location and to identify the prose tests.

I also moved the validation to the constructors as it seemed the best place to have it.

Copy link
Member Author

@rozza rozza left a comment

Choose a reason for hiding this comment

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

Updated the code

@rozza rozza requested a review from vbabanin October 21, 2025 10:44
@rozza rozza requested a review from vbabanin November 20, 2025 10:10
@rozza rozza requested a review from vbabanin December 16, 2025 10:59
vbabanin
vbabanin previously approved these changes Jan 20, 2026
rozza and others added 15 commits January 22, 2026 14:48
Moved specifications submodule out of driver-core into a testing directory.
Deleted old copy of bson specification tests and updated to use the submodule
Fixed Json output for positive exponents to match the the extended json specification

Added test exceptions to BinaryVectorGenericBsonTest
Added BsonBinaryVector prose tests
Added extra regression tests to ensure both explicit and implicit doubles with positive exponets parse as expected.

JAVA-5877
JAVA-5779
JAVA-5782
JAVA-5652
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Viacheslav Babanin <frest0512@gmail.com>
Co-authored-by: Viacheslav Babanin <frest0512@gmail.com>
Co-authored-by: Viacheslav Babanin <frest0512@gmail.com>
Co-authored-by: Viacheslav Babanin <frest0512@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants