Skip to content

Feature: query-and-write writeConcern parameter#620

Open
imforster wants to merge 4 commits into
documentdb:mainfrom
imforster:forstaia/writeConcern/query_and_write
Open

Feature: query-and-write writeConcern parameter#620
imforster wants to merge 4 commits into
documentdb:mainfrom
imforster:forstaia/writeConcern/query_and_write

Conversation

@imforster

@imforster imforster commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

#39
Test cases: 344 (+ 6 replica_set skipped on standalone)
Docs: https://www.mongodb.com/docs/v8.2/reference/write-concern/

Adds compatibility test coverage for the writeConcern cross-cutting parameter, validating its full surface area across write commands (update, delete, findAndModify) - from document type acceptance and sub-field validation (w, j, wtimeout) to full BSON type rejection matrix, value boundary cases, w:0 unacknowledged behavior, j:true override semantics, Decimal128 exponent-form coercions, case sensitivity, unknown field rejection, and findAndModify return value independence from writeConcern.

350 test cases across 5 files following project test guidelines.

Note: insert writeConcern already covered at commands/insert/test_insert_write_concern.py.

@imforster imforster requested a review from a team as a code owner June 17, 2026 18:05
@imforster imforster force-pushed the forstaia/writeConcern/query_and_write branch from 2cf971e to 8a923cc Compare June 17, 2026 18:21
Test cases: 344 (+ 6 replica_set skipped on standalone)
Docs: https://www.mongodb.com/docs/v8.2/reference/write-concern/

Adds compatibility test coverage for the writeConcern cross-cutting
parameter across write commands (update, delete, findAndModify) — from
document type acceptance and sub-field validation (w, j, wtimeout) to
full BSON type rejection matrix, value boundary cases, w:0 unacknowledged
behavior, j:true override semantics, Decimal128 exponent-form coercions,
case sensitivity, unknown field rejection, provenance sub-field acceptance,
wtimeout edge cases, w:0 writeError suppression, fractional double
coercion, and findAndModify return value independence from writeConcern.

350 test cases across 4 files following project test guidelines.
insert already covered at commands/insert/test_insert_write_concern.py.
bulkWrite excluded: admin-database command with different infrastructure.

Signed-off-by: Ian Forster <forstaia@amazon.com>
@imforster imforster force-pushed the forstaia/writeConcern/query_and_write branch from 8a923cc to 971c71d Compare June 17, 2026 18:25
- Move PROVENANCE_ACCEPTANCE_TESTS from field_validation to acceptance file
- Remove unused assertNotError import from validation file
- Clarify bulkWrite exclusion rationale in utils comment

Signed-off-by: Ian Forster <forstaia@amazon.com>
@imforster imforster added compatibility test Compatibility test related enhancement New feature or request labels Jun 17, 2026
…adConcern local availability

writeConcern field validation:
- Add INT64_MAX and INT64_MIN to w value rejection tests
- Add tagged object validation: reject empty {}, string tag values,
  and nested object tag values
- Add wtimeout extended overflow rejection for double, Decimal128,
  and +Infinity exceeding INT32_MAX

writeConcern acceptance:
- Add wtimeout boundary acceptance tests: INT32_MIN, -Infinity (double),
  and -Infinity (Decimal128) are accepted (upper-bound only constraint)

readConcern:
- Add test_read_concern_local_availability.py covering 'local' level
  availability without sessions, on aggregate/count/distinct, on empty
  collections, and equivalence to omitting readConcern

Signed-off-by: Ian Forster <forstaia@amazon.com>
test_read_concern_local_is_default_equivalent had two assertNotError calls
in one function, violating the one-assertion-per-test rule. Replaced with
a single test_read_concern_local_does_not_error that asserts only the
readConcern 'local' case.

Signed-off-by: Ian Forster <forstaia@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compatibility test Compatibility test related enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant