Skip to content

Add timeseries collection tests#236

Open
danielfrankcom wants to merge 1 commit into
documentdb:mainfrom
danielfrankcom:pr/timeseries
Open

Add timeseries collection tests#236
danielfrankcom wants to merge 1 commit into
documentdb:mainfrom
danielfrankcom:pr/timeseries

Conversation

@danielfrankcom
Copy link
Copy Markdown
Collaborator

This change adds general tests for timeseries collections.

The aim here is to test the runtime semantics unique to timeseries collections. This includes granularity upgrade/downgrade via collMod, field immutability (timeField/metaField cannot be changed), default index creation, etc.

A separate file was added under the createIndexes command path because timeseries collections have a distinct set of index type restrictions. These are createIndexes-specific behaviors that belong alongside the other createIndexes tests rather than in the collections directory, consistent with how capped/clustered collection tests don't duplicate command-level validation that already has a better home.

The TimeseriesCollection helper in target_collection.py was refactored to accept a raw timeseries_options dict and optional create_options dict, replacing the previous individual fields. This makes it easier to test arbitrary timeseries configurations without needing to add a new field for each option. The existing collStats test that used the old interface was updated accordingly.

Signed-off-by: Daniel Frankcom <[email protected]>
@danielfrankcom danielfrankcom requested a review from a team as a code owner May 25, 2026 20:19
@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 L · Status Needs Review
Confidence: 0.88 (mixed)

Reasoning

component from path globs (test-coverage, test-framework); effort from diff stats (882+19 LOC, 8 files); LLM: Adds new timeseries collection test coverage across multiple files including a helper refactor and new index restriction tests, touching several test directories.

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 25, 2026
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