hello-stephen opened a new pull request, #66289:
URL: https://github.com/apache/doris/pull/66289
### What problem does this PR solve?
Issue Number: N/A
Related PR: N/A
Problem Summary:
When global regression TLS mode is enabled, `SuiteContext.connect()` appends
Doris mTLS parameters to every supplied JDBC URL and returns that rewritten URL
before opening a connection. As a result, external JDBC setup closures do not
run, and external MySQL/PostgreSQL regression cases fail before their source
databases are prepared.
This change removes the TLS-specific URL rewriting from `connect()`. The
method now remains protocol-agnostic, opens the exact URL supplied by the
caller, switches the thread-local connection, executes the closure, and
restores the original connection. Doris TLS parameters remain applied to the
default Doris JDBC URL by `Config.createDefaultDb()`.
A unit test enables global TLS mode and uses an external recording JDBC
driver to verify that:
- the supplied external URL is unchanged;
- a real JDBC connection is opened;
- the closure executes with the temporary connection;
- the connection is closed and the original thread-local state is restored.
This Draft PR targets `branch-4.1` because the release External regression
is blocked. The same defect is present on master and the other maintained
release branches and should be synchronized after this fix is reviewed.
### Release note
None
### Check List (For Author)
- Test
- [ ] Regression test
- [x] Unit Test: `mvn test` in `regression-test/framework` (4 tests passed)
- [ ] Manual test
- [ ] No need to test
- Behavior changed:
- [x] Yes. `connect()` now opens the caller-provided JDBC URL and executes
its closure when global TLS mode is enabled.
- Does this need documentation?
- [x] No
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]