Skip to content

Commit fefbd6e

Browse files
committed
made requirement for JDK8 for j8 build
1 parent 6fef328 commit fefbd6e

File tree

4 files changed

+40
-44
lines changed

4 files changed

+40
-44
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
21
5757
cache: "maven"
5858
- name: Build and install libraries
59-
run: mvn --batch-mode --no-transfer-progress --show-version --strict-checksums --threads 2 -Dmaven.wagon.rto=30000 -Dj8 -DskipITs install
59+
run: mvn --batch-mode --no-transfer-progress --show-version --strict-checksums --threads 2 -Dmaven.wagon.rto=30000 -Dj8 -Dmaven.test.skip=true install
6060
- name: Compile examples
6161
run: |
6262
export LIB_VER=$(grep '<revision>' pom.xml | sed -e 's|[[:space:]]*<[/]*revision>[[:space:]]*||g')

clickhouse-data/src/test/java/com/clickhouse/data/ClickHouseSimpleRecordTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ public void testNullInput() {
2828
public void testMismatchedColumnsAndValues() {
2929

3030
Assert.assertThrows(IllegalArgumentException.class, () -> ClickHouseSimpleRecord
31-
.of(Map.of("a", 0), new ClickHouseValue[0]));
31+
.of(Collections.singletonMap("a", 0), new ClickHouseValue[0]));
3232

33-
ClickHouseSimpleRecord record = new ClickHouseSimpleRecord(Map.of("a", 0),
33+
ClickHouseSimpleRecord record = new ClickHouseSimpleRecord(Collections.singletonMap("a", 0),
3434
new ClickHouseValue[0]);
3535
Assert.assertEquals(record.getValues(), new ClickHouseValue[0]);
3636
}

jdbc-v2/src/test/java/com/clickhouse/jdbc/ConnectionTest.java

Lines changed: 14 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
package com.clickhouse.jdbc;
22

3-
import java.nio.charset.StandardCharsets;
4-
import java.sql.*;
5-
import java.util.*;
6-
7-
import java.util.Properties;
8-
93
import com.clickhouse.client.ClickHouseNode;
104
import com.clickhouse.client.ClickHouseProtocol;
115
import com.clickhouse.client.ClickHouseServerForTest;
@@ -23,6 +17,20 @@
2317
import org.testng.annotations.DataProvider;
2418
import org.testng.annotations.Test;
2519

20+
import java.nio.charset.StandardCharsets;
21+
import java.sql.Array;
22+
import java.sql.Connection;
23+
import java.sql.DatabaseMetaData;
24+
import java.sql.PreparedStatement;
25+
import java.sql.ResultSet;
26+
import java.sql.SQLException;
27+
import java.sql.SQLFeatureNotSupportedException;
28+
import java.sql.Statement;
29+
import java.util.Arrays;
30+
import java.util.Base64;
31+
import java.util.Properties;
32+
import java.util.UUID;
33+
2634
import static org.testng.Assert.assertThrows;
2735
import static org.testng.Assert.fail;
2836

@@ -347,32 +355,6 @@ public void getNetworkTimeoutTest() throws SQLException {
347355
assertThrows(SQLFeatureNotSupportedException.class, () -> localConnection.getNetworkTimeout());
348356
}
349357

350-
@Test(groups = { "integration" })
351-
public void beginRequestTest() throws SQLException {
352-
Connection localConnection = this.getJdbcConnection();
353-
localConnection.beginRequest();//No-op
354-
}
355-
356-
@Test(groups = { "integration" })
357-
public void endRequestTest() throws SQLException {
358-
Connection localConnection = this.getJdbcConnection();
359-
localConnection.endRequest();//No-op
360-
}
361-
362-
@Test(groups = { "integration" })
363-
public void setShardingKeyIfValidTest() throws SQLException {
364-
Connection localConnection = this.getJdbcConnection();
365-
assertThrows(SQLFeatureNotSupportedException.class, () -> localConnection.setShardingKeyIfValid(null, 0));
366-
assertThrows(SQLFeatureNotSupportedException.class, () -> localConnection.setShardingKeyIfValid(null, null, 0));
367-
}
368-
369-
@Test(groups = { "integration" })
370-
public void setShardingKeyTest() throws SQLException {
371-
Connection localConnection = this.getJdbcConnection();
372-
assertThrows(SQLFeatureNotSupportedException.class, () -> localConnection.setShardingKey(null));
373-
assertThrows(SQLFeatureNotSupportedException.class, () -> localConnection.setShardingKey(null, null));
374-
}
375-
376358
@Test(groups = { "integration" })
377359
public void testMaxResultRowsProperty() throws Exception {
378360
Properties properties = new Properties();

pom.xml

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@
146146
<jmh.version>1.37</jmh.version>
147147
<guava.version>33.4.6-jre</guava.version>
148148

149-
<minJdk>1.8</minJdk>
149+
<minTargetJdk>17</minTargetJdk>
150+
<minSourceJdk>17</minSourceJdk>
150151
<skipTests>false</skipTests>
151152
<skipITs>${skipTests}</skipITs>
152153
<skipUTs>${skipTests}</skipUTs>
@@ -591,10 +592,8 @@
591592
<groupId>org.apache.maven.plugins</groupId>
592593
<artifactId>maven-compiler-plugin</artifactId>
593594
<configuration>
594-
<source>${minJdk}</source>
595-
<target>${minJdk}</target>
596-
<testSource>17</testSource>
597-
<testTarget>17</testTarget>
595+
<source>${minSourceJdk}</source>
596+
<target>${minSourceJdk}</target>
598597
<showWarnings>true</showWarnings>
599598
<compilerArgs>
600599
<arg>-Xlint:all</arg>
@@ -812,6 +811,21 @@
812811
<name>j8</name>
813812
</property>
814813
</activation>
814+
<build>
815+
<plugins>
816+
<plugin>
817+
<groupId>org.apache.maven.plugins</groupId>
818+
<artifactId>maven-compiler-plugin</artifactId>
819+
<configuration>
820+
<target>1.8</target>
821+
<source>1.8</source>
822+
<jdkToolchain>
823+
<version>1.8</version>
824+
</jdkToolchain>
825+
</configuration>
826+
</plugin>
827+
</plugins>
828+
</build>
815829
<properties>
816830
<caffeine.version>2.9.2</caffeine.version>
817831
</properties>
@@ -948,7 +962,7 @@
948962
<groupId>org.apache.maven.plugins</groupId>
949963
<artifactId>maven-javadoc-plugin</artifactId>
950964
<configuration>
951-
<source>${minJdk}</source>
965+
<source>${minSourceJdk}</source>
952966
</configuration>
953967
<executions>
954968
<execution>
@@ -1044,8 +1058,8 @@
10441058
<groupId>org.apache.maven.plugins</groupId>
10451059
<artifactId>maven-compiler-plugin</artifactId>
10461060
<configuration>
1047-
<source>${minJdk}</source>
1048-
<target>${minJdk}</target>
1061+
<source>1.8</source>
1062+
<target>1.8</target>
10491063
<showWarnings>true</showWarnings>
10501064
<compilerArgs>
10511065
<arg>-Xlint:all</arg>
@@ -1179,7 +1193,7 @@
11791193
<groupId>org.apache.maven.plugins</groupId>
11801194
<artifactId>maven-javadoc-plugin</artifactId>
11811195
<configuration>
1182-
<source>${minJdk}</source>
1196+
<source>${minSourceJdk}</source>
11831197
</configuration>
11841198
<executions>
11851199
<execution>

0 commit comments

Comments
 (0)