Skip to content

[PECOBLR-2086] Add comprehensive MST transaction metadata and edge case tests#763

Open
vikrantpuppala wants to merge 2 commits intomainfrom
add-mst-transaction-tests
Open

[PECOBLR-2086] Add comprehensive MST transaction metadata and edge case tests#763
vikrantpuppala wants to merge 2 commits intomainfrom
add-mst-transaction-tests

Conversation

@vikrantpuppala
Copy link
Contributor

Summary

  • Adds 42 new E2E tests to test_transactions.py and 3 new unit tests to test_client.py covering gaps identified in the MST + xDBC Metadata RPCs audit
  • E2E coverage: metadata operations in txn (cursor.columns/tables/schemas/catalogs), MSTCheckRule-blocked SQL, allowed MST ops (USE CATALOG/SCHEMA), DML variants (executemany, parameterized, DELETE, mixed), concurrent transactions (write conflict, write skew, repeatable reads), multiple cursors, connection lifecycle, DDL behavior, edge cases
  • Unit test coverage: executemany error propagation, cursor close vs txn state, autocommit toggle consistency

Test plan

  • Run pytest tests/unit/test_client.py -k Transaction — 25 tests pass (verified)
  • Run pytest tests/e2e/test_transactions.py -p no:skip against MST-enabled warehouse
  • Verify all 60 E2E tests (18 existing + 42 new) pass
  • Confirm MSTCheckRule-blocked tests detect transaction abort

NO_CHANGELOG=true

This pull request was AI-assisted by Isaac.

@vikrantpuppala vikrantpuppala force-pushed the add-mst-transaction-tests branch 2 times, most recently from 523ab8e to 85e92e1 Compare March 26, 2026 11:54
Adds 42 new E2E tests and 3 unit tests covering gaps identified in
MST + xDBC metadata audit:

E2E tests (test_transactions.py):
- Metadata operations (cursor.columns/tables/schemas/catalogs) in txn
- MSTCheckRule-blocked SQL (SHOW/DESCRIBE/information_schema) in MST
- Allowed operations (USE CATALOG/SCHEMA) in MST
- DML variants: executemany, parameterized, DELETE, mixed DML in txn
- Concurrent transactions: write conflict, write skew, repeatable reads
- Multiple cursors in single transaction
- Connection close with pending transaction (implicit rollback)
- DDL behavior in transactions (CREATE/DROP/ALTER TABLE)
- Edge cases: empty txn, read-only, atomicity, rollback recovery, MERGE

Unit tests (test_client.py):
- executemany error propagation in transaction context
- Cursor close does not affect transaction state
- Autocommit toggle consistency

Co-authored-by: Isaac
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
@vikrantpuppala vikrantpuppala force-pushed the add-mst-transaction-tests branch from 85e92e1 to c5a2e80 Compare March 26, 2026 12:24
Co-authored-by: Isaac
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
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