Skip to content

Commit bebe888

Browse files
committed
Add dedicated Edge integration test workflow
1 parent f2535c3 commit bebe888

5 files changed

Lines changed: 483 additions & 0 deletions

File tree

‎.github/workflows/edge-it.yml‎

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Edge IT
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- "rel/*"
8+
- "rc/*"
9+
paths-ignore:
10+
- "docs/**"
11+
- "site/**"
12+
- "iotdb-client/client-cpp/**"
13+
- ".github/workflows/client-cpp-package.yml"
14+
- ".github/scripts/package-client-cpp-*.sh"
15+
- ".github/workflows/multi-language-client.yml"
16+
pull_request:
17+
branches:
18+
- master
19+
- "rel/*"
20+
- "rc/*"
21+
paths-ignore:
22+
- "docs/**"
23+
- "site/**"
24+
- "iotdb-client/client-cpp/**"
25+
- ".github/workflows/client-cpp-package.yml"
26+
- ".github/scripts/package-client-cpp-*.sh"
27+
- ".github/workflows/multi-language-client.yml"
28+
workflow_dispatch:
29+
30+
concurrency:
31+
group: ${{ github.workflow }}-${{ github.ref }}
32+
cancel-in-progress: true
33+
34+
env:
35+
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
36+
MAVEN_ARGS: --batch-mode --no-transfer-progress
37+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
38+
39+
jobs:
40+
Ubuntu:
41+
runs-on: ubuntu-latest
42+
43+
steps:
44+
- uses: actions/checkout@v5
45+
- name: Set up JDK
46+
uses: actions/setup-java@v5
47+
with:
48+
distribution: corretto
49+
java-version: 17
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
- name: Cache Maven packages
53+
uses: actions/cache@v5
54+
with:
55+
path: ~/.m2
56+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
57+
restore-keys: ${{ runner.os }}-m2-
58+
- name: Build Edge distribution
59+
shell: bash
60+
run: |
61+
mvn clean package \
62+
-DskipTests \
63+
-pl distribution \
64+
-am
65+
- name: Edge IT
66+
shell: bash
67+
run: |
68+
mvn verify \
69+
-P with-integration-tests,EdgeIT \
70+
-DskipUTs \
71+
-Dit.test=IoTDBEdgeBasicIT \
72+
-DfailIfNoTests=false \
73+
-Dfailsafe.failIfNoSpecifiedTests=false \
74+
-pl integration-test \
75+
-am
76+
- name: Upload Artifact
77+
if: failure()
78+
uses: actions/upload-artifact@v6
79+
with:
80+
name: edge-log-Linux
81+
path: |
82+
integration-test/target/edge-it/**/*.log
83+
integration-test/target/failsafe-reports
84+
if-no-files-found: ignore
85+
retention-days: 1

‎CLAUDE.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ mvn clean verify -DskipUTs -Dit.test=ClassName -DfailIfNoTests=false -Dfailsafe.
9292

9393
# Run a single test method within an IT class (use ClassName#methodName)
9494
mvn clean verify -DskipUTs -Dit.test=ClassName#methodName -DfailIfNoTests=false -Dfailsafe.failIfNoSpecifiedTests=false -pl integration-test -am -PTableSimpleIT -P with-integration-tests
95+
96+
# Build the Edge distribution and run its dedicated Tree/Table read-write IT
97+
mvn clean package -DskipTests -pl distribution -am
98+
mvn verify -DskipUTs -Dit.test=IoTDBEdgeBasicIT -DfailIfNoTests=false -Dfailsafe.failIfNoSpecifiedTests=false -pl integration-test -am -P EdgeIT -P with-integration-tests
9599
```
96100

97101
When verifying a new feature, only run the specific IT classes/methods that were added or modified in the current branch — do not run all ITs.

‎integration-test/pom.xml‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
<name>IoTDB: Integration-Test</name>
3131
<properties>
3232
<integrationTest.excludedGroups/>
33+
<integrationTest.edgePackage>${maven.multiModuleProjectDirectory}/distribution/target/apache-iotdb-${project.version}-edge-bin.zip</integrationTest.edgePackage>
3334
<integrationTest.forkCount>1</integrationTest.forkCount>
3435
<integrationTest.includedGroups/>
3536
<integrationTest.launchNodeInSameJVM>true</integrationTest.launchNodeInSameJVM>
@@ -333,6 +334,7 @@
333334
<forkCount>${integrationTest.forkCount}</forkCount>
334335
<reuseForks>false</reuseForks>
335336
<systemPropertyVariables>
337+
<EdgePackage>${integrationTest.edgePackage}</EdgePackage>
336338
<TestEnv>${integrationTest.testEnv}</TestEnv>
337339
<RandomSelectWriteNode>${integrationTest.randomSelectWriteNode}</RandomSelectWriteNode>
338340
<ReadAndVerifyWithMultiNode>${integrationTest.readAndVerifyWithMultiNode}</ReadAndVerifyWithMultiNode>
@@ -447,6 +449,20 @@
447449
</plugins>
448450
</build>
449451
<profiles>
452+
<profile>
453+
<id>EdgeIT</id>
454+
<activation>
455+
<activeByDefault>false</activeByDefault>
456+
</activation>
457+
<properties>
458+
<integrationTest.excludedGroups>org.apache.iotdb.itbase.category.ManualIT</integrationTest.excludedGroups>
459+
<integrationTest.includedGroups>org.apache.iotdb.itbase.category.EdgeIT</integrationTest.includedGroups>
460+
<integrationTest.launchNodeInSameJVM>true</integrationTest.launchNodeInSameJVM>
461+
<integrationTest.randomSelectWriteNode>false</integrationTest.randomSelectWriteNode>
462+
<integrationTest.readAndVerifyWithMultiNode>false</integrationTest.readAndVerifyWithMultiNode>
463+
<integrationTest.testEnv>Simple</integrationTest.testEnv>
464+
</properties>
465+
</profile>
450466
<profile>
451467
<id>SimpleIT</id>
452468
<activation>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
package org.apache.iotdb.itbase.category;
20+
21+
public interface EdgeIT {}

0 commit comments

Comments
 (0)