# mongo-java-driver Validation Report Generated 2026-05-12 — SecantusDB 0.5.0b18 vs mongo-java-driver cb45be6bb147 (`vendor/mongo-java-driver/`). Run `uv run python -m invoke validate-java` to refresh. The pass rate is the analogue of the pymongo / mongo-go-driver / mongo-node-driver gauges for the official Java driver — the language enterprise MongoDB consumers most often use. ## Scope `driver-sync/src/test/functional/` contains **112** test classes upstream. The gauge currently runs **18** of them (~16%). The other 94 are either intentionally out of scope (encryption / atlas-search / kotlin-or-scala wrappers / OCSP / DNS / retryable / monitoring) or unaudited — they haven't been added to `java_validation/include_modules.py` because each new class needs the runner's wall-clock guard to confirm it terminates before it ships. The pass rate below describes the included subset, not the whole functional tree. ## Summary by module | Module | Passed | Failed | Skipped | Total | Pass rate | |---|---:|---:|---:|---:|---:| | `bson` | 3809 | 0 | 11 | 3820 | 100.0% | | `driver-sync` | 395 | 5 | 406 | 806 | 98.8% | | **Overall** | **4204** | **5** | **417** | **4626** | **99.9%** | ## Failures (5) First 30 failed tests for triage: ``` driver-sync :: com.mongodb.client.ContextProviderTest#contextShouldBeAvailableInCommandEvents() driver-sync :: com.mongodb.client.unified.UnifiedWriteConcernTest#default-write-concern-3.4: MapReduce omits default write concern driver-sync :: com.mongodb.client.unified.VersionedApiTest#CRUD Api Version 1 (strict): aggregate on database appends declared API version driver-sync :: com.mongodb.client.unified.VersionedApiTest#CRUD Api Version 1 (strict): distinct appends declared API version driver-sync :: com.mongodb.client.unified.ChangeStreamsTest#change-streams-errors: The watch helper must not throw a custom exception when executed against a single server topology, but instead depend on a server error ``` ## How this is generated **mongo-java-driver's tests are run unmodified, against a standalone SecantusDB daemon.** The submodule at `vendor/mongo-java-driver/` is checked out at the pinned upstream tag with zero local edits. `java_validation/runner.py` does a two-phase spawn: phase 1 boots `python -m secantus --port 27018 --storage-path --standalone` without `--auth` and uses pymongo to createUser `root-user` (root role); phase 2 stops that daemon and restarts on the same tempdir **with `--auth`**, so the user record persists and the server now enforces auth. Gradle then runs the driver's bundled wrapper (`./gradlew --no-daemon -Dorg.mongodb.test.uri=mongodb://root-user:password@127.0.0.1:27018/?authSource=admin`) for the in-scope modules in `java_validation/include_modules.py`. The system property is the seam Java's `ClusterFixture` test infrastructure reads; Gradle forwards it to the test JVM. Standalone topology is critical: without `--standalone` the driver's `getSecondary()` is an unbounded sleep loop on non-RS deployments. These are **integration specs** under `driver-sync/src/test/functional/` — every test opens a real TCP connection to the SecantusDB daemon, SCRAM-authenticates, and exchanges wire commands end-to-end. The pass rate is therefore a true measure of SecantusDB's compatibility with the Java driver, not of the driver's own pure-code logic. The include set is currently narrow on purpose — `MongoCollectionTest`, `MongoClientTest`, `ExplainTest`, `ReadConcernTest`, `MongoWriteConcernWithResponseExceptionTest` — added one at a time as each is proven to terminate against SecantusDB. The driver writes JUnit XML to `/build/test-results/test/TEST-*.xml`; we copy those out of the vendored tree (so the submodule stays untouched) and parse them here. Widen `include_modules.py` to add more test classes.