Skip to content

[PECOBLR-2086] Add comprehensive MST transaction E2E tests#774

Closed
vikrantpuppala wants to merge 1 commit intodatabricks:mainfrom
vikrantpuppala:add-mst-transaction-tests-v2
Closed

[PECOBLR-2086] Add comprehensive MST transaction E2E tests#774
vikrantpuppala wants to merge 1 commit intodatabricks:mainfrom
vikrantpuppala:add-mst-transaction-tests-v2

Conversation

@vikrantpuppala
Copy link
Copy Markdown
Contributor

Summary

  • Rewrites tests/e2e/test_transactions.py with 42 MST tests across 5 categories
  • Tests are parallelization-friendly (each test uses its own unique Delta table)
  • Full suite runs in ~2 minutes on 4 workers (pytest -n 4 --dist=loadgroup)
  • Covers gaps identified in the MST + xDBC Metadata RPCs audit

Test categories

  • TestMstCorrectness (18) — commit/rollback/isolation/multi-table atomicity/repeatable reads/write conflict/parameterized DML/auto-start after commit/rollback/close-connection-implicit-rollback
  • TestMstApi (6) — DB-API-specific: autocommit getter/setter, isolation level (supported + unsupported), commit without active txn, setAutoCommit during active txn
  • TestMstMetadata (6)cursor.columns/tables/schemas/catalogs inside a txn + two freshness tests asserting Thrift metadata RPCs are non-transactional (they see concurrent DDL that the txn should not see)
  • TestMstBlockedSql (9) — MSTCheckRule enforcement. 6 statements throw + abort txn (SHOW TABLES/SCHEMAS/CATALOGS/FUNCTIONS, DESCRIBE TABLE EXTENDED, information_schema). 3 statements succeed silently on Python/Thrift (SHOW COLUMNS, DESCRIBE TABLE, DESCRIBE QUERY) — diverges from JDBC, documented explicitly.
  • TestMstExecuteVariants (2) — executemany commit + rollback

Parallelisation strategy

  • Each test derives a unique Delta table name from its node id so 4 parallel workers don't collide.
  • Tests that spawn concurrent connections to the same table (repeatable reads, write conflict, freshness) use xdist_group so the concurrent connections within a single test don't conflict with other tests on different workers.

Test plan

  • Run full suite locally against dogfood warehouse — 42/42 pass in ~2 minutes on 4 workers
  • Verify e2e CI completes within the existing ~15min budget

Related

NO_CHANGELOG=true

This pull request was AI-assisted by Isaac.

Replaces the prior speculative test skeleton with 42 tests across 5
categories:

- TestMstCorrectness (18): commit/rollback/isolation/multi-table
  atomicity/repeatable reads/write conflict/parameterized DML/etc.
- TestMstApi (6): DB-API-specific — autocommit, isolation level,
  error handling.
- TestMstMetadata (6): cursor.columns/tables/schemas/catalogs inside
  a transaction, plus two freshness tests asserting Thrift metadata
  RPCs are non-transactional (they see concurrent DDL that the txn
  should not see).
- TestMstBlockedSql (9): MSTCheckRule enforcement. Some SHOW/DESCRIBE
  commands throw + abort txn, others succeed silently on Python/Thrift
  (diverges from JDBC). Both behaviors are explicitly tested so
  regressions in either direction are caught.
- TestMstExecuteVariants (2): executemany commit/rollback.

Parallelisation:
- Each test uses a unique Delta table derived from its test name so
  pytest-xdist workers don't collide on shared state.
- Tests that spawn concurrent connections to the same table
  (repeatable reads, write conflict, freshness) use xdist_group so
  the concurrent connections within a single test don't conflict with
  other tests on different workers.

Runtime: ~2 minutes on 4 workers (pytest -n 4 --dist=loadgroup),
well within the existing e2e budget.

Co-authored-by: Isaac
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
@vikrantpuppala
Copy link
Copy Markdown
Contributor Author

Closing — re-creating from the main repo (not fork) so CI's JFrog OIDC auth works.

@vikrantpuppala vikrantpuppala deleted the add-mst-transaction-tests-v2 branch April 21, 2026 06:24
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.

1 participant