Skip to content

Add serverStatus tests#623

Open
alinaliBQ wants to merge 12 commits into
documentdb:mainfrom
alinaliBQ:serverStatus
Open

Add serverStatus tests#623
alinaliBQ wants to merge 12 commits into
documentdb:mainfrom
alinaliBQ:serverStatus

Conversation

@alinaliBQ

@alinaliBQ alinaliBQ commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Add command operator tests for serverStatus. Tests database serverStatus behavior, output collection, and syntax. There is no specific error code from serverStatus, since serverStatus is permissive to its inputs.

Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
@documentdb-triage-tool documentdb-triage-tool Bot added compatibility test Compatibility test related enhancement New feature or request labels Jun 18, 2026
@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 In Progress
Confidence: 0.85 (mixed)

Reasoning

component from path globs (test-coverage); effort from diff stats (1029+0 LOC, 6 files); LLM: Adds new test coverage for the serverStatus command, covering behavior, output, syntax, and error cases — a functional enhancement to the test suite.

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.

Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
@alinaliBQ alinaliBQ marked this pull request as ready for review June 18, 2026 18:05
@alinaliBQ alinaliBQ requested a review from a team as a code owner June 18, 2026 18:05
def test_serverStatus_uptimeMillis_consistent_with_uptime(collection):
"""Verify serverStatus uptime is consistent with uptimeMillis."""
result = execute_admin_command(collection, {"serverStatus": 1})
uptime_from_millis = result["uptimeMillis"] // 1000

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could get flaky,
would assert(uptime: Gte(uptime_from_millis - 1)) make more sense ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it, changed to use Gte(uptime_from_millis - 1)

Signed-off-by: Alina (Xi) Li <Alina.Li@improving.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.

2 participants