-
Type: Spec Change
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Component/s: Unified Test Runner
-
Needed
-
While working on mongodb/specifications#925 I realized a discrepancy between the spec and JSON schema.
In the spec, tests[].operations is documented as a "required array of one or more operation objects"; however, the schema does not specify minItems: 1 for that field.
Other documentation for withTransaction and loop operations (both of which solicit operations arrays) does not prohibit empty arrays. I'll note that operations are not covered by the JSON schema, so there was no change for discrepancy either way.
I often use empty tests[].operations arrays when writing "valid-fail" tests, particularly when focused on another aspect of the test format (e.g. entity definitions). I propose that we stick with the JSON schema and simply remove "one or more" from the spec text. Additionally, I would add a "valid-pass" test to assert that a test case with an empty operations array passes. That should catch any drivers that may have been requiring a non-empty array based on the original spec language.
- split to
-
NODE-6489 Test operations may be an empty array
- Needs Triage
-
PYTHON-4936 Test operations may be an empty array
- Needs Triage
-
CDRIVER-5786 Test operations may be an empty array
- Backlog
-
CSHARP-5390 Test operations may be an empty array
- Backlog
-
CXX-3156 Test operations may be an empty array
- Backlog
-
GODRIVER-3408 Test operations may be an empty array
- Backlog
-
JAVA-5681 Test operations may be an empty array
- Backlog
-
RUBY-3580 Test operations may be an empty array
- Backlog
-
RUST-2083 Test operations may be an empty array
- Backlog
-
PHPLIB-1578 Test operations may be an empty array
- In Code Review
-
MOTOR-1400 Test operations may be an empty array
- Closed