test(csharp): cover production-shaped warehouse path in fast-metadata + org-id parsing - #564
Open
jadewang-db wants to merge 1 commit into
Open
test(csharp): cover production-shaped warehouse path in fast-metadata + org-id parsing#564jadewang-db wants to merge 1 commit into
jadewang-db wants to merge 1 commit into
Conversation
… + org-id parsing
Add test cases pinning the real-world warehouse path shape
(/sql/1.0/warehouses/{16-char-hex}?o={numeric-org-id}) that existing
tests only exercised with placeholder ids like abc123/987654:
- IsWarehousePath_WarehousePaths_ReturnsTrue: assert the fast-metadata
warehouse classification strips the ?o= query string and matches.
- StatementExecutionConnectionOrgIdTests: assert the SEA path extracts
both warehouse id and org id from the same path shape.
Both paths already handled this correctly; these lock in the concrete case.
Co-authored-by: Isaac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds test cases that pin the real-world SQL warehouse path shape —
/sql/1.0/warehouses/{16-char-hex}?o={numeric-org-id}— to the warehouse-classification and org-id parsing tests. Existing tests only exercised placeholder ids (abc123/987654).DatabricksConnectionUnitTests.IsWarehousePath_WarehousePaths_ReturnsTrue: adds/sql/1.0/warehouses/8d1707669a5ea9e2?o=6051921418418893, asserting the fast-metadata warehouse classification strips the?o=query string and matches the warehouse regex.StatementExecutionConnectionOrgIdTests.Constructor_RealWorldWarehousePathWithOrgId_ExtractsWarehouseIdAndOrgId: asserts the SEA path extracts both warehouse id (8d1707669a5ea9e2) and org id (6051921418418893) from the same path shape.Why
Verifying a question about whether the fast-metadata path correctly detects the warehouse type for a production path like
/sql/1.0/warehouses/8d1707669a5ea9e2?o=6051921418418893. Both the Thrift path (DatabricksConnection.IsWarehousePath) and the SEA path (StatementExecutionConnection) already strip the query string before regex matching and handle this correctly — these tests lock in the concrete production-shaped case so it can't regress.Test
Both new cases run and pass:
Tests only — no production code change.
This pull request and its description were written by Isaac.