You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Test fixes for MST metadata expectations and User-Agent env leak (#788)
* Fix test_useragent_header leaking agent env vars
Clear all KNOWN_AGENTS env vars in test_useragent_header before
connecting, mirroring the pattern in test_agent_detection.py. Without
this, running the test inside an AI-agent shell (e.g. Claude Code, which
sets CLAUDECODE=1) causes session.py to append " agent/<product>" to
the User-Agent and the strict `in` assertion fails. CI runners don't
set agent env vars so this passes there, but the test is environment-
sensitive locally.
Co-authored-by: Isaac
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
* [PECOBLR-2461] Flip TestMstMetadata: server now blocks Thrift Get* in MST
The TestMstMetadata tests were written speculatively expecting the
Thrift Get{Catalogs,Schemas,Tables,Columns} RPCs to succeed inside an
active multi-statement transaction. The server's MST guard now rejects
these RPCs with TRANSACTION_NOT_SUPPORTED ("... is not supported within
a multi-statement transaction."), matching the intentional design where
MST exposes a small allowlist of SQL forms.
Flip the four `*_in_mst` tests into `*_blocked` tests asserting the
expected DatabaseError. The two `*_non_transactional_after_concurrent_*`
freshness tests are deleted outright — their entire premise ("Thrift
RPCs bypass MST and see concurrent DDL") is no longer valid, so there
is nothing meaningful left to assert.
Note: the rejection happens at the MST guard before reaching the txn,
so the active transaction remains usable after a blocked Get* (unlike
SQL forms in TestMstBlockedSql, where the failure aborts the txn).
The shared helper documents this distinction.
Verified against dogfood: 4 passed in 33.67s.
Co-authored-by: Isaac
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
---------
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
0 commit comments