Skip to content

Add $listCollections command tests#156

Merged
eerxuan merged 6 commits intodocumentdb:mainfrom
danielfrankcom:pr/listCollections
May 4, 2026
Merged

Add $listCollections command tests#156
eerxuan merged 6 commits intodocumentdb:mainfrom
danielfrankcom:pr/listCollections

Conversation

@danielfrankcom
Copy link
Copy Markdown
Collaborator

This change adds tests for the $listCollections command.

Note that the assertProperties patterns from #144 have been included here, since the other change has not been merged yet.

Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
@danielfrankcom danielfrankcom requested a review from a team as a code owner May 1, 2026 22:30
@documentdb-triage-tool
Copy link
Copy Markdown

🤖 Auto-triaged by documentdb-triage-tool.

Applied: compatibility test, enhancement
Project fields suggested: Component test-coverage · Priority P2 · Effort XL · Status Needs Review
Confidence: 0.80 (mixed)

Reasoning

component from path globs (test-coverage, test-framework); effort from diff stats (4786+33 LOC, 20 files); LLM: Adds new test cases for the $listCollections command, expanding test coverage in the compatibility tests directory.

If a label is wrong, remove it manually and ping @patty-chow so the rules can be tuned. The bot will not re-label items that already have component labels.

@documentdb-triage-tool documentdb-triage-tool Bot added compatibility test Compatibility test related enhancement New feature or request labels May 1, 2026
Ne(0) is vacuously true because cursor.id is Int64 and strict_equal
rejects cross-type numeric comparisons. Use INT64_ZERO so the
assertion actually validates the cursor is open.
Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
Remove non-boundary Decimal128 cases that don't distinguish banker's
rounding from standard rounding. Keep only the .5 boundary cases
(0.5, 1.5, 2.5) that exercise round-half-to-even in both directions.
Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
The full Eq() match included server-expanded defaults like the ICU
version string, which is an implementation detail. Use Exists() for
the collation object and Eq() only for the requested locale.
Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
Ne() with a mismatched numeric type (e.g. Ne(int(0)) against Int64)
is vacuously true because strict_equal rejects cross-type numerics.
Detect this and fail with a clear diagnostic. Uses type() membership
rather than isinstance() to avoid false positives on bool.
Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
@eerxuan eerxuan merged commit ca4c820 into documentdb:main May 4, 2026
5 checks passed
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.

3 participants