Skip to content

Commit 5a50d6a

Browse files
authored
Refactor ClickHouse's nativeTest (#35476)
1 parent dcd34bd commit 5a50d6a

20 files changed

Lines changed: 522 additions & 254 deletions

File tree

docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.cn.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ java.beans.Introspector was unintentionally initialized at build time. To see wh
4747
<plugin>
4848
<groupId>org.graalvm.buildtools</groupId>
4949
<artifactId>native-maven-plugin</artifactId>
50-
<version>0.10.5</version>
50+
<version>0.10.6</version>
5151
<extensions>true</extensions>
5252
<configuration>
5353
<buildArgs>
@@ -85,12 +85,12 @@ java.beans.Introspector was unintentionally initialized at build time. To see wh
8585

8686
```groovy
8787
plugins {
88-
id 'org.graalvm.buildtools.native' version '0.10.5'
88+
id 'org.graalvm.buildtools.native' version '0.10.6'
8989
}
9090
9191
dependencies {
9292
implementation 'org.apache.shardingsphere:shardingsphere-jdbc:${shardingsphere.version}'
93-
implementation(group: 'org.graalvm.buildtools', name: 'graalvm-reachability-metadata', version: '0.10.5', classifier: 'repository', ext: 'zip')
93+
implementation(group: 'org.graalvm.buildtools', name: 'graalvm-reachability-metadata', version: '0.10.6', classifier: 'repository', ext: 'zip')
9494
}
9595
9696
graalvmNative {

docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.en.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ and the documentation of GraalVM Native Build Tools shall prevail.
4949
<plugin>
5050
<groupId>org.graalvm.buildtools</groupId>
5151
<artifactId>native-maven-plugin</artifactId>
52-
<version>0.10.5</version>
52+
<version>0.10.6</version>
5353
<extensions>true</extensions>
5454
<configuration>
5555
<buildArgs>
@@ -89,12 +89,12 @@ Reference https://github.com/graalvm/native-build-tools/issues/572 .
8989

9090
```groovy
9191
plugins {
92-
id 'org.graalvm.buildtools.native' version '0.10.5'
92+
id 'org.graalvm.buildtools.native' version '0.10.6'
9393
}
9494
9595
dependencies {
9696
implementation 'org.apache.shardingsphere:shardingsphere-jdbc:${shardingsphere.version}'
97-
implementation(group: 'org.graalvm.buildtools', name: 'graalvm-reachability-metadata', version: '0.10.5', classifier: 'repository', ext: 'zip')
97+
implementation(group: 'org.graalvm.buildtools', name: 'graalvm-reachability-metadata', version: '0.10.6', classifier: 'repository', ext: 'zip')
9898
}
9999
100100
graalvmNative {

docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/development/_index.cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ ShardingSphere 定义了,
2727

2828
1. GraalVM CE 22.0.2,或与 GraalVM CE 22.0.2 兼容的 GraalVM 下游发行版。以 [GraalVM Native Image](/cn/user-manual/shardingsphere-jdbc/graalvm-native-image) 为准。
2929
2. 编译 GraalVM Native Image 所需要的本地工具链。以 https://www.graalvm.org/latest/reference-manual/native-image/#prerequisites 为准。
30-
3. 可运行 Linux Containers 的 Docker Engine,或与 testcontainer-java 兼容的 Container Runtime。以 https://java.testcontainers.org/supported_docker_environment/ 为准。
30+
3. 可运行 Linux Containers 的 Docker Engine,或与 testcontainers-java 兼容的 Container Runtime。以 https://java.testcontainers.org/supported_docker_environment/ 为准。
3131

3232
本文不讨论 `LLVM Backend for Native Image`。下文分别讨论在 Ubuntu,Windows 与 Windows Server 下可能的所需操作。
3333

docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/development/_index.en.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Developer must have installed on their devices,
2929

3030
1. GraalVM CE 22.0.2, or a GraalVM downstream distribution compatible with GraalVM CE 22.0.2. Refer to [GraalVM Native Image](/en/user-manual/shardingsphere-jdbc/graalvm-native-image).
3131
2. The native toolchain required to compile the GraalVM Native Image. Refer to https://www.graalvm.org/latest/reference-manual/native-image/#prerequisites .
32-
3. Docker Engine that can run Linux Containers, or a Container Runtime compatible with testcontainer-java. Refer to https://java.testcontainers.org/supported_docker_environment/ .
32+
3. Docker Engine that can run Linux Containers, or a Container Runtime compatible with testcontainers-java. Refer to https://java.testcontainers.org/supported_docker_environment/ .
3333

3434
This article does not discuss `LLVM Backend for Native Image`. The following sections discuss the possible required operations under Ubuntu, Windows, and Windows Server.
3535

@@ -141,7 +141,7 @@ Developer can use the following commands to compile the GraalVM Native Image req
141141
```shell
142142
git clone git@github.com:apache/shardingsphere.git
143143
cd ./shardingsphere/
144-
./mvnw -PgenerateMetadata -e -T 1C clean test
144+
./mvnw -PnativeTestInShardingSphere -e -T 1C clean test
145145
```
146146
147147
When Windows pops up a window asking developer to allow an app with a path like `C:\users\shard\shardingsphere\test\native\target\native-tests.exe.exe` to pass through Windows Firewall,

docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ ShardingSphere 对 ClickHouse JDBC Driver 的支持位于可选模块中。
4343
```yaml
4444
services:
4545
clickhouse-server:
46-
image: clickhouse/clickhouse-server:24.11.1.2557
46+
image: clickhouse/clickhouse-server:25.4.5.24
4747
ports:
4848
- "8123:8123"
4949
```

docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Write a Docker Compose file to start ClickHouse.
4343
```yaml
4444
services:
4545
clickhouse-server:
46-
image: clickhouse/clickhouse-server:24.11.1.2557
46+
image: clickhouse/clickhouse-server:25.4.5.24
4747
ports:
4848
- "8123:8123"
4949
```

docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/hiveserver2/_index.cn.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ ShardingSphere 对 HiveServer2 JDBC Driver 的支持位于可选模块中。
2020
<artifactId>shardingsphere-jdbc</artifactId>
2121
<version>${shardingsphere.version}</version>
2222
</dependency>
23-
<dependency>
24-
<groupId>org.apache.shardingsphere</groupId>
25-
<artifactId>shardingsphere-infra-database-hive</artifactId>
26-
<version>${shardingsphere.version}</version>
27-
</dependency>
2823
<dependency>
2924
<groupId>org.apache.shardingsphere</groupId>
3025
<artifactId>shardingsphere-parser-sql-hive</artifactId>
@@ -67,11 +62,6 @@ ShardingSphere 对 HiveServer2 JDBC Driver 的支持位于可选模块中。
6762
<artifactId>shardingsphere-jdbc</artifactId>
6863
<version>${shardingsphere.version}</version>
6964
</dependency>
70-
<dependency>
71-
<groupId>org.apache.shardingsphere</groupId>
72-
<artifactId>shardingsphere-infra-database-hive</artifactId>
73-
<version>${shardingsphere.version}</version>
74-
</dependency>
7565
<dependency>
7666
<groupId>org.apache.shardingsphere</groupId>
7767
<artifactId>shardingsphere-parser-sql-hive</artifactId>

docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/hiveserver2/_index.en.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ The possible Maven dependencies are as follows.
2121
<artifactId>shardingsphere-jdbc</artifactId>
2222
<version>${shardingsphere.version}</version>
2323
</dependency>
24-
<dependency>
25-
<groupId>org.apache.shardingsphere</groupId>
26-
<artifactId>shardingsphere-infra-database-hive</artifactId>
27-
<version>${shardingsphere.version}</version>
28-
</dependency>
2924
<dependency>
3025
<groupId>org.apache.shardingsphere</groupId>
3126
<artifactId>shardingsphere-parser-sql-hive</artifactId>
@@ -69,11 +64,6 @@ The following is an example of a possible configuration,
6964
<artifactId>shardingsphere-jdbc</artifactId>
7065
<version>${shardingsphere.version}</version>
7166
</dependency>
72-
<dependency>
73-
<groupId>org.apache.shardingsphere</groupId>
74-
<artifactId>shardingsphere-infra-database-hive</artifactId>
75-
<version>${shardingsphere.version}</version>
76-
</dependency>
7767
<dependency>
7868
<groupId>org.apache.shardingsphere</groupId>
7969
<artifactId>shardingsphere-parser-sql-hive</artifactId>

infra/reachability-metadata/src/main/resources/META-INF/native-image/com.github.docker-java/docker-java-api/3.4.0/reflect-config.json

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -649,28 +649,35 @@
649649
"allDeclaredMethods": true
650650
},
651651
{
652-
"condition":{"typeReachable":"org.testcontainers.shaded.com.fasterxml.jackson.databind.util.ClassUtil"},
652+
"condition":{"typeReachable":"com.github.dockerjava.api.model.PullResponseItem"},
653653
"name":"com.github.dockerjava.api.model.PullResponseItem",
654654
"allDeclaredMethods": true
655655
},
656656
{
657-
"condition":{"typeReachable":"org.testcontainers.shaded.com.fasterxml.jackson.databind.util.ClassUtil"},
657+
"condition":{"typeReachable":"com.github.dockerjava.api.model.ResponseItem"},
658658
"name":"com.github.dockerjava.api.model.ResponseItem",
659659
"allDeclaredMethods": true
660660
},
661661
{
662-
"condition":{"typeReachable":"org.testcontainers.shaded.com.fasterxml.jackson.databind.util.ClassUtil"},
662+
"condition":{"typeReachable":"com.github.dockerjava.api.model.ResponseItem"},
663663
"name":"com.github.dockerjava.api.model.ResponseItem$AuxDetail",
664664
"allDeclaredMethods": true
665665
},
666666
{
667-
"condition":{"typeReachable":"org.testcontainers.shaded.com.fasterxml.jackson.databind.util.ClassUtil"},
667+
"condition":{"typeReachable":"com.github.dockerjava.api.model.ResponseItem"},
668668
"name":"com.github.dockerjava.api.model.ResponseItem$ErrorDetail",
669669
"allDeclaredMethods": true
670670
},
671671
{
672-
"condition":{"typeReachable":"org.testcontainers.shaded.com.fasterxml.jackson.databind.util.ClassUtil"},
672+
"condition":{"typeReachable":"com.github.dockerjava.api.model.ResponseItem"},
673673
"name":"com.github.dockerjava.api.model.ResponseItem$ProgressDetail",
674674
"allDeclaredMethods": true
675+
},
676+
{
677+
"condition":{"typeReachable":"com.github.dockerjava.api.model.ImageOptions"},
678+
"name":"com.github.dockerjava.api.model.ImageOptions",
679+
"allDeclaredFields":true,
680+
"allDeclaredMethods": true,
681+
"allDeclaredConstructors":true
675682
}
676683
]

0 commit comments

Comments
 (0)