Skip to content

Commit b8318b8

Browse files
authored
test: add apiserver integration test (#3674)
1 parent 7ca5f44 commit b8318b8

File tree

53 files changed

+1312
-474
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1312
-474
lines changed

.github/workflows/integration-test-src.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ jobs:
104104
html_body: test/integration-test/openmldb-test-java/openmldb-sdk-test/target/surefire-reports/html/overview.html
105105
to: ${{ secrets.MAIL_TO }}
106106
from: GitHub Actions
107-
content_type: text/plain
108107
attachments: surefire-reports.tar.gz
109108

110109
java-sdk-cluster-memory-task:
@@ -148,7 +147,6 @@ jobs:
148147
html_body: file://test/integration-test/openmldb-test-java/openmldb-sdk-test/target/surefire-reports/html/overview.html
149148
to: ${{ secrets.MAIL_TO }}
150149
from: GitHub Actions
151-
content_type: text/plain
152150
attachments: surefire-reports.tar.gz
153151

154152
java-sdk-cluster-memory-1:
@@ -191,7 +189,6 @@ jobs:
191189
body: OpenMLDB Memory 1 Test Failed
192190
to: ${{ secrets.MAIL_TO }}
193191
from: GitHub Actions
194-
content_type: text/plain
195192
attachments: surefire-reports.tar.gz
196193

197194
java-sdk-cluster-ssd-0:
@@ -234,7 +231,6 @@ jobs:
234231
body: OpenMLDB SSD Test Failed
235232
to: ${{ secrets.MAIL_TO }}
236233
from: GitHub Actions
237-
content_type: text/plain
238234
attachments: surefire-reports.tar.gz
239235

240236
# java-sdk-cluster-ssd-task:
@@ -320,7 +316,6 @@ jobs:
320316
body: OpenMLDB HDD Test Failed
321317
to: ${{ secrets.MAIL_TO }}
322318
from: GitHub Actions
323-
content_type: text/plain
324319
attachments: surefire-reports.tar.gz
325320

326321
# java-sdk-cluster-hdd-task:
@@ -568,5 +563,4 @@ jobs:
568563
html_body: test/integration-test/openmldb-test-java/openmldb-sdk-test/target/surefire-reports/html/overview.html
569564
to: ${{ secrets.MAIL_TO }}
570565
from: GitHub Actions
571-
content_type: text/plain
572566
attachments: surefire-reports.tar.gz

.github/workflows/selfhost_intergration.yml

Lines changed: 93 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ jobs:
3838
make SQL_JAVASDK_ENABLE=ON && make SQL_JAVASDK_ENABLE=ON install
3939
mv openmldb-linux openmldb-main-linux
4040
tar -zcf openmldb-linux.tar.gz openmldb-main-linux
41+
mv java/openmldb-batch/target/openmldb*-SNAPSHOT.jar openmldb-batch.jar
42+
mv java/openmldb-jdbc/target/openmldb*-SNAPSHOT.jar openmldb-jdbc.jar
43+
mv java/openmldb-native/target/openmldb*-SNAPSHOT.jar openmldb-native.jar
4144
- name: download
4245
if: ${{ env.E_VERSION != 'main' }}
4346
run: |
@@ -48,9 +51,64 @@ jobs:
4851
uses: actions/upload-artifact@v3
4952
with:
5053
name: openmldb-package
51-
path: openmldb-linux.tar.gz
54+
path: |
55+
openmldb-batch.jar
56+
openmldb-jdbc.jar
57+
openmldb-native.jar
58+
openmldb-linux.tar.gz
5259
53-
60+
apiserver-cluster:
61+
needs: build-openmldb
62+
63+
runs-on: [self-hosted,common-user]
64+
steps:
65+
- uses: actions/checkout@v3
66+
- name: before test
67+
if: ${{ env.ETYPE == 'all' || env.ETYPE == 'java' }}
68+
run: mkdir ${{ github.job }}
69+
- name: download artifact
70+
uses: actions/download-artifact@v3
71+
with:
72+
name: openmldb-package
73+
- name: install openmldb
74+
run: |
75+
tar -zxf openmldb-linux.tar.gz -C ${{ github.job }}/
76+
bash test/steps/format_config.sh $(pwd)/${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux ${{ github.job }} 20001 21000 java
77+
bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/deploy-all.sh
78+
bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/start-all.sh
79+
- name: test
80+
run: bash test/steps/openmldb-integration-test.sh -j 0.0.0 -d deploy -m apiserver
81+
- name: stop openmldb
82+
if: always()
83+
run: bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/stop-all.sh
84+
- name: remove openmldb
85+
if: always()
86+
run: bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/clear-all.sh
87+
- name: TEST Results
88+
if: always()
89+
uses: EnricoMi/publish-unit-test-result-action@v1
90+
with:
91+
files: test/integration-test/openmldb-test-java/openmldb-sdk-test/target/surefire-reports/TEST-*.xml
92+
check_name: "SRC apiserver-cluster Report"
93+
comment_title: "SRC apiserver-cluster Report"
94+
- name: tar test report
95+
if: ${{ failure() }}
96+
run: tar -zcvf surefire-reports.tar.gz test/integration-test/openmldb-test-java/openmldb-sdk-test/target/surefire-reports
97+
- name: Send Email
98+
if: ${{ failure() }}
99+
uses: dawidd6/action-send-mail@master
100+
with:
101+
server_address: mail.4paradigm.com
102+
server_port: 995
103+
username: ${{ secrets.MAIL_USERNAME }}
104+
password: ${{ secrets.MAIL_PASSWORD }}
105+
secure: true
106+
subject: OpenMLDB Memory Test
107+
body: OpenMLDB Memory Test Failed
108+
html_body: test/integration-test/openmldb-test-java/openmldb-sdk-test/target/surefire-reports/html/overview.html
109+
to: ${{ secrets.MAIL_TO }}
110+
from: GitHub Actions
111+
attachments: surefire-reports.tar.gz
54112

55113
java-sdk-cluster-memory-0:
56114
needs: build-openmldb
@@ -72,16 +130,12 @@ jobs:
72130
bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/deploy-all.sh
73131
bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/start-all.sh
74132
- name: test
75-
run: |
76-
mkdir mvnrepo
77-
export MAVEN_OPTS="-Dmaven.repo.local=$(pwd)/mvnrepo"
78-
echo $MAVEN_OPTS
79-
bash test/steps/openmldb-sdk-test-java-src.sh -c test_cluster.xml -d deploy -l "0" -s "memory"
133+
run: bash test/steps/openmldb-integration-test.sh -j 0.0.0 -c test_cluster.xml -d deploy -l "0" -s "memory"
80134
- name: stop openmldb
81135
if: always()
82136
run: bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/stop-all.sh
83137
- name: remove openmldb
84-
if: success()
138+
if: always()
85139
run: bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/clear-all.sh
86140
- name: TEST Results
87141
if: always()
@@ -97,10 +151,11 @@ jobs:
97151
if: ${{ failure() }}
98152
uses: dawidd6/action-send-mail@master
99153
with:
100-
server_address: smtp.partner.outlook.cn
101-
server_port: 587
154+
server_address: mail.4paradigm.com
155+
server_port: 995
102156
username: ${{ secrets.MAIL_USERNAME }}
103157
password: ${{ secrets.MAIL_PASSWORD }}
158+
secure: true
104159
subject: OpenMLDB Memory Test
105160
body: OpenMLDB Memory Test Failed
106161
html_body: test/integration-test/openmldb-test-java/openmldb-sdk-test/target/surefire-reports/html/overview.html
@@ -129,16 +184,12 @@ jobs:
129184
bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/deploy-all.sh
130185
bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/start-all.sh
131186
- name: test
132-
run: |
133-
mkdir mvnrepo
134-
export MAVEN_OPTS="-Dmaven.repo.local=$(pwd)/mvnrepo"
135-
echo $MAVEN_OPTS
136-
bash test/steps/openmldb-sdk-test-java-src.sh -c test_cluster.xml -d deploy -l "1,2,3,4,5" -s "memory"
187+
run: bash test/steps/openmldb-integration-test.sh -j 0.0.0 -c test_cluster.xml -d deploy -l "1,2,3,4,5" -s "memory"
137188
- name: stop openmldb
138189
if: always()
139190
run: bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/stop-all.sh
140191
- name: remove openmldb
141-
if: success()
192+
if: always()
142193
run: bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/clear-all.sh
143194
- name: TEST Results
144195
if: always()
@@ -154,10 +205,11 @@ jobs:
154205
if: ${{ failure() }}
155206
uses: dawidd6/action-send-mail@master
156207
with:
157-
server_address: smtp.partner.outlook.cn
158-
server_port: 587
208+
server_address: mail.4paradigm.com
209+
server_port: 995
159210
username: ${{ secrets.MAIL_USERNAME }}
160211
password: ${{ secrets.MAIL_PASSWORD }}
212+
secure: true
161213
subject: OpenMLDB Memory Test
162214
body: OpenMLDB Memory Test Failed
163215
html_body: test/integration-test/openmldb-test-java/openmldb-sdk-test/target/surefire-reports/html/overview.html
@@ -187,16 +239,12 @@ jobs:
187239
bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/deploy-all.sh
188240
bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/start-all.sh
189241
- name: test
190-
run: |
191-
mkdir mvnrepo
192-
export MAVEN_OPTS="-Dmaven.repo.local=$(pwd)/mvnrepo"
193-
echo $MAVEN_OPTS
194-
bash test/steps/openmldb-sdk-test-java-src.sh -c test_cluster_disk.xml -d deploy -l "0" -s "hdd"
242+
run: bash test/steps/openmldb-integration-test.sh -j 0.0.0 -c test_cluster_disk.xml -d deploy -l "0" -s "hdd"
195243
- name: stop openmldb
196244
if: always()
197245
run: bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/stop-all.sh
198246
- name: remove openmldb
199-
if: success()
247+
if: always()
200248
run: bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/clear-all.sh
201249
- name: TEST Results
202250
if: always()
@@ -212,10 +260,11 @@ jobs:
212260
if: ${{ failure() }}
213261
uses: dawidd6/action-send-mail@master
214262
with:
215-
server_address: smtp.partner.outlook.cn
216-
server_port: 587
263+
server_address: mail.4paradigm.com
264+
server_port: 995
217265
username: ${{ secrets.MAIL_USERNAME }}
218266
password: ${{ secrets.MAIL_PASSWORD }}
267+
secure: true
219268
subject: OpenMLDB HDD Test
220269
body: OpenMLDB HDD Test Failed
221270
html_body: test/integration-test/openmldb-test-java/openmldb-sdk-test/target/surefire-reports/html/overview.html
@@ -240,20 +289,16 @@ jobs:
240289
- name: install openmldb
241290
run: |
242291
tar -zxf openmldb-linux.tar.gz -C ${{ github.job }}/
243-
bash test/steps/format_config.sh $(pwd)/${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux java-sdk-cluster-memory-0 23001 24000 java ssd
292+
bash test/steps/format_config.sh $(pwd)/${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux ${{ github.job }} 23001 24000 java ssd
244293
bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/deploy-all.sh
245294
bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/start-all.sh
246295
- name: test
247-
run: |
248-
mkdir mvnrepo
249-
export MAVEN_OPTS="-Dmaven.repo.local=$(pwd)/mvnrepo"
250-
echo $MAVEN_OPTS
251-
bash test/steps/openmldb-sdk-test-java-src.sh -c test_cluster_disk.xml -d deploy -l "0" -s "ssd"
296+
run: bash test/steps/openmldb-integration-test.sh -j 0.0.0 -c test_cluster_disk.xml -d deploy -l "0" -s "ssd"
252297
- name: stop openmldb
253298
if: always()
254299
run: bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/stop-all.sh
255300
- name: remove openmldb
256-
if: success()
301+
if: always()
257302
run: bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/clear-all.sh
258303
- name: TEST Results
259304
if: always()
@@ -269,10 +314,11 @@ jobs:
269314
if: ${{ failure() }}
270315
uses: dawidd6/action-send-mail@master
271316
with:
272-
server_address: smtp.partner.outlook.cn
273-
server_port: 587
317+
server_address: mail.4paradigm.com
318+
server_port: 995
274319
username: ${{ secrets.MAIL_USERNAME }}
275320
password: ${{ secrets.MAIL_PASSWORD }}
321+
secure: true
276322
subject: OpenMLDB SSD Test
277323
body: OpenMLDB SSD Test Failed
278324
html_body: test/integration-test/openmldb-test-java/openmldb-sdk-test/target/surefire-reports/html/overview.html
@@ -299,19 +345,15 @@ jobs:
299345
bash test/steps/format_config.sh $(pwd)/${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux ${{ github.job }} 24001 25000 java hadoop
300346
bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/deploy-all.sh
301347
bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/start-all.sh
302-
bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/stop-taskmanager.sh
303-
bash HADOOP_CONF_DIR=/mnt/hdd0/denglong/openmldb_runner_work/hadoop ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/stop-taskmanager.sh
348+
bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/stop-taskmanagers.sh
349+
HADOOP_CONF_DIR=/mnt/hdd0/denglong/openmldb_runner_work/hadoop ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/stop-taskmanagers.sh
304350
- name: test
305-
run: |
306-
mkdir mvnrepo
307-
export MAVEN_OPTS="-Dmaven.repo.local=$(pwd)/mvnrepo"
308-
echo $MAVEN_OPTS
309-
bash test/steps/openmldb-sdk-test-java-src.sh -c test_yarn.xml -d deploy -l "0" -s "memory"
351+
run: bash test/steps/openmldb-integration-test.sh -j 0.0.0 -c test_yarn.xml -d deploy -l "0" -s "memory"
310352
- name: stop openmldb
311353
if: always()
312354
run: bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/stop-all.sh
313355
- name: remove openmldb
314-
if: success()
356+
if: always()
315357
run: bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/clear-all.sh
316358
- name: TEST Results
317359
if: always()
@@ -327,10 +369,11 @@ jobs:
327369
if: ${{ failure() }}
328370
uses: dawidd6/action-send-mail@master
329371
with:
330-
server_address: smtp.partner.outlook.cn
331-
server_port: 587
372+
server_address: mail.4paradigm.com
373+
server_port: 995
332374
username: ${{ secrets.MAIL_USERNAME }}
333375
password: ${{ secrets.MAIL_PASSWORD }}
376+
secure: true
334377
subject: OpenMLDB yarn Test
335378
body: OpenMLDB yarn Test Failed
336379
html_body: test/integration-test/openmldb-test-java/openmldb-sdk-test/target/surefire-reports/html/overview.html
@@ -359,15 +402,12 @@ jobs:
359402
bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/deploy-all.sh
360403
bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/start-all.sh
361404
- name: test
362-
run: |
363-
mkdir mvnrepo
364-
export MAVEN_OPTS="-Dmaven.repo.local=$(pwd)/mvnrepo"
365-
echo $MAVEN_OPTS
405+
run: echo "a"
366406
- name: stop openmldb
367407
if: always()
368408
run: bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/stop-all.sh
369409
- name: remove openmldb
370-
if: success()
410+
if: always()
371411
run: bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/clear-all.sh
372412
# - name: TEST Results
373413
# if: always()
@@ -383,8 +423,9 @@ jobs:
383423
# if: ${{ failure() }}
384424
# uses: dawidd6/action-send-mail@master
385425
# with:
386-
# server_address: smtp.partner.outlook.cn
387-
# server_port: 587
426+
# server_address: mail.4paradigm.com
427+
# server_port: 995
428+
# secure: true
388429
# username: ${{ secrets.MAIL_USERNAME }}
389430
# password: ${{ secrets.MAIL_PASSWORD }}
390431
# subject: OpenMLDB yarn Test

0 commit comments

Comments
 (0)