Skip to content

Adding issue #2245 test #2296

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 10, 2025
Merged

Adding issue #2245 test #2296

merged 2 commits into from
Apr 10, 2025

Conversation

mzitnik
Copy link
Contributor

@mzitnik mzitnik commented Apr 9, 2025

Summary

Added simple test.
I have run it from an external app that imports the dependency.

<dependency>
      <groupId>com.clickhouse</groupId>
      <artifactId>clickhouse-jdbc</artifactId>
      <version>0.8.2</version>
      <classifier>shaded-all</classifier>
</dependency>

It works

Adding as a fallback to load from a class's class loader (for example, in DbVisualizer)

Screenshot 2025-04-10 at 11 38 40

Closes #2245

Checklist

Delete items not relevant to your PR:

mzitnik added 2 commits April 9, 2025 11:32
…t classloader for those cases when the thread is running in a different classloader
@mzitnik mzitnik marked this pull request as ready for review April 10, 2025 08:46
@mzitnik mzitnik requested review from chernser and Paultagoras April 10, 2025 08:47
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
7.1% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@@ -532,7 +532,17 @@ public static String readVersionFromResource(String resourceFilePath) {
tmpVersion = tmp;
}
} catch (Exception e) {
// ignore
try(InputStream in = ClickHouseClientOption.class.getClassLoader().getResourceAsStream(resourceFilePath)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the exception?
Should we use this way in default branch?

@mzitnik mzitnik merged commit 19946ce into main Apr 10, 2025
24 of 25 checks passed
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.

The Clickhouse JDBC driver doesn't report driver version
2 participants