Skip to content

Add autoCompact command tests#629

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

Add autoCompact command tests#629
danielfrankcom wants to merge 1 commit into
documentdb:mainfrom
danielfrankcom:pr/autoCompact

Conversation

@danielfrankcom

Copy link
Copy Markdown
Collaborator

This change adds tests for the autoCompact administration command.

This command is relatively simple, but since it has server-wide effects, these need to run with the no_parallel marker. The effect of this command can also extend beyond the runtime of a test case, so I introduced the ensure_autocompact_idle utility so test cases can wait for a stable state before they run.

Closes #415

Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
@danielfrankcom danielfrankcom requested a review from a team as a code owner June 19, 2026 18:45
@documentdb-triage-tool documentdb-triage-tool Bot added compatibility test Compatibility test related enhancement New feature or request labels Jun 19, 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 Needs Review
Confidence: 0.88 (mixed)

Reasoning

component from path globs (test-coverage, test-framework); effort from diff stats (930+1 LOC, 10 files); LLM: Adds new test cases for the autoCompact command within the compatibility test suite, including a utility for stable-state waiting and no_parallel markers.

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.

# state ensure_autocompact_idle guarantees, installing a persistent config
# that the differing enable below then conflicts with.
execute_admin_command(collection, {"autoCompact": True, "freeSpaceTargetMB": 30})
result = execute_admin_command(collection, {"autoCompact": True, "freeSpaceTargetMB": 50})

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

can we also add a case that set freeSpaceTargetMB the same value, will it error out or not?

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.

Add compatibility test for autoCompact

2 participants