Skip to content

Add fsync command tests#657

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

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

Conversation

@danielfrankcom

Copy link
Copy Markdown
Collaborator

This change adds tests for the fsync command.

There is some machinery overlap with #641 but they have the same content so they should merge cleanly.

Closes #420

Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
@danielfrankcom danielfrankcom requested a review from a team as a code owner June 29, 2026 21:48
@documentdb-triage-tool documentdb-triage-tool Bot added compatibility test Compatibility test related enhancement New feature or request labels Jun 29, 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.30 (deterministic)

Reasoning

component from path globs (test-coverage, test-framework); effort from diff stats (1081+1 LOC, 11 files); LLM failed: Invalid response body while trying to fetch https://api.anthropic.com/v1/messages: Premature close

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.

@ramgokul-14

Copy link
Copy Markdown

Required - Doc update needed for conftest.py validator allowance — the change to test_structure_validator.py is a project-wide convention change. Per REVIEW.md §9, update TEST_FORMAT.md or FOLDER_STRUCTURE.md to document that conftest.py is a valid non-test Python file.

Suggestions

  • Add a max-iteration guard to drain_fsync_lock's while True to prevent CI hangs
  • Assert the first lock acquisition succeeded in test_fsync_lock_persists_after_connection_close before closing the client
  • Consider an inline comment in test_fsync_rejects_non_admin_database explaining why execute_command (non-admin) is used

Questions

  • Is afterClusterTime in readConcern in-scope, or is the current level-focused testing sufficient for an admin command that mostly rejects these options?
  • Was placing the fixture at administration/conftest.py (parent level) considered vs. the re-export pattern?

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 fsync

2 participants