Skip to content

Add execute_command/assertion framework and migrate tests to runCommand format#20

Merged
nitinahuja89 merged 3 commits intodocumentdb:mainfrom
eerxuan:assertion-execution-framework-2
Apr 1, 2026
Merged

Add execute_command/assertion framework and migrate tests to runCommand format#20
nitinahuja89 merged 3 commits intodocumentdb:mainfrom
eerxuan:assertion-execution-framework-2

Conversation

@eerxuan
Copy link
Copy Markdown
Contributor

@eerxuan eerxuan commented Mar 25, 2026

Add framework modules:

  • framework/executor.py: execute_command, execute_admin_command
  • framework/infra_exceptions.py: infrastructure error detection. Will update analyzer to use the same list of errors in following PR.
  • framework/assertions.py: assertSuccess, assertFailure, assertResult

Migrate all existing tests from PyMongo driver calls to runCommand format using execute_command + framework assertions. This enables consistent error handling and result comparison across engines.

Update framework/init.py exports and simplify tests/init.py.

@eerxuan eerxuan requested a review from a team as a code owner March 25, 2026 22:26
@eerxuan eerxuan force-pushed the assertion-execution-framework-2 branch 2 times, most recently from 847bd84 to 8f9222c Compare March 25, 2026 22:32
…nd format

Add framework modules:
- framework/executor.py: execute_command, execute_admin_command
- framework/infra_exceptions.py: infrastructure error detection
- framework/assertions.py: assertSuccess, assertFailure, assertResult

Migrate all existing tests from PyMongo driver calls to runCommand
format using execute_command + framework assertions. This enables
consistent error handling and result comparison across engines.

Update framework/__init__.py exports and simplify tests/__init__.py.

Signed-off-by: Yunxuan Shi <yunxuan@amazon.com>

# Conflicts:
#	documentdb_tests/compatibility/tests/core/operator/stages/group/test_group_stage.py
#	documentdb_tests/compatibility/tests/core/operator/stages/match/test_match_stage.py
@eerxuan eerxuan force-pushed the assertion-execution-framework-2 branch from 8f9222c to 1c1b300 Compare March 25, 2026 22:57
@eerxuan eerxuan force-pushed the assertion-execution-framework-2 branch from 0a6e01b to 3fb0931 Compare March 31, 2026 23:05
Signed-off-by: Yunxuan Shi <yunxuan@amazon.com>
@eerxuan eerxuan force-pushed the assertion-execution-framework-2 branch from 3fb0931 to b5d5606 Compare March 31, 2026 23:06
@nitinahuja89 nitinahuja89 merged commit 36efdab into documentdb:main Apr 1, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants