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
Low Risk
Test-only and documentation changes; no driver or public API behavior changes. Integration tests mutate server users/profiles locally and are skipped on cloud.
Overview
Adds integration coverage for ClickHouse readonly settings profiles when the JDBC client sends JSON-related server settings (e.g. output_format_binary_write_json_as_string).
ReadonlyProfileTest provisions two users with readonly=1 and readonly=2, grants SELECT only on the integration test database, and skips on cloud. One case expects a connection/query failure when readonly=1 blocks overriding settings; the other expects success under readonly=2 with experimental JSON enabled.
JdbcDataTypeTests.testJSONRead now asserts JSON columns from getObject() are Map instances and checks keys/values explicitly (including empty {}).
docs/ai-review.md adds reviewer notes for tests that create users, use GRANT, and handle passwords.
Reviewed by Cursor Bugbot for commit c170d3d. Bugbot is set up for automated code reviews on this repo. Configure here.
Repository collaborators can run the JMH benchmark suite against this PR by commenting:
/benchmark
Optional regression threshold override (Δ% on Time or Alloc/op; defaults to 10%):
/benchmark threshold=15
Only one benchmark run per PR is active at a time — issuing a new /benchmark comment cancels the previous run. After the run finishes a separate comment will be posted comparing it against the latest scheduled run on main; the PR check fails if any benchmark regresses by more than the threshold.
chernser
changed the title
[JDBC-v2] Reonly Profile tests
[JDBC-v2] Readonly Profile tests
Jun 18, 2026
Summary
This PR adds integration test coverage for ClickHouse readonly settings profiles in the context of JDBC JSON handling (issue #2760). The new ReadonlyProfileTest class provisions two test users (readonly=1 and readonly=2) with scoped SELECT grants on the test database only, verifies that readonly=1 blocks overriding server settings while readonly=2 allows it, and tears down all created objects in @AfterClass. The existing JdbcDataTypeTests.testJSONRead is strengthened to assert Map instance type and per-key equality. A documentation note is added to docs/ai-review.md guiding future reviewers on how to evaluate tests that create users and issue GRANT statements.
What this impacts
jdbc-v2 integration test suite only — no source or public API changes
docs/ai-review.md — adds reviewer guidance for user/grant-creating tests; no behavior change
Required reviewer action
AI review with no comments → eligible for auto-merge per repo policy.
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
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.
Summary
Closes #2760
Checklist
Delete items not relevant to your PR:
Note
Low Risk
Test-only and documentation changes; no driver or public API behavior changes. Integration tests mutate server users/profiles locally and are skipped on cloud.
Overview
Adds integration coverage for ClickHouse
readonlysettings profiles when the JDBC client sends JSON-related server settings (e.g.output_format_binary_write_json_as_string).ReadonlyProfileTestprovisions two users withreadonly=1andreadonly=2, grants SELECT only on the integration test database, and skips on cloud. One case expects a connection/query failure whenreadonly=1blocks overriding settings; the other expects success underreadonly=2with experimental JSON enabled.JdbcDataTypeTests.testJSONReadnow asserts JSON columns fromgetObject()areMapinstances and checks keys/values explicitly (including empty{}).docs/ai-review.mdadds reviewer notes for tests that create users, use GRANT, and handle passwords.Reviewed by Cursor Bugbot for commit c170d3d. Bugbot is set up for automated code reviews on this repo. Configure here.