-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1351 from daizhenyu/tag-transmission-demo
流量标签透传插件集成测试部分demo和集成测试脚本
- Loading branch information
Showing
36 changed files
with
2,239 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,14 +91,6 @@ runs: | |
shell: bash | ||
run: | | ||
echo "sermantServiceRemovalChanged=${{ steps.changed-sermant-removal.outputs.changed }}" >> $GITHUB_ENV | ||
- uses: marceloprado/[email protected] | ||
id: changed-sermant-tag-transmission | ||
with: | ||
paths: sermant-plugins/sermant-tag-transmission | ||
- name: env sermant-sermant-tag-transmission | ||
shell: bash | ||
run: | | ||
echo "sermantTagTransmissionChanged=${{ steps.changed-sermant-tag-transmission.outputs.changed }}" >> $GITHUB_ENV | ||
- uses: marceloprado/[email protected] | ||
id: changed-workflow-or-test | ||
with: | ||
|
@@ -187,12 +179,6 @@ runs: | |
echo "enableRemoval=true" >> $GITHUB_ENV | ||
fi | ||
# *****************tagtransmission.yml***************** | ||
# ==========tag transmission is needed to test?========== | ||
if [ ${{ env.sermantAgentCoreChanged }} == 'true' -o ${{ env.sermantTagTransmissionChanged }} == 'true';then | ||
echo "enableTagTransmission=true" >> $GITHUB_ENV | ||
fi | ||
# all workflow will trigger while workflow changed | ||
if [ ${{ steps.changed-workflow-or-test.outputs.changed }} == 'true' -o ${{ env.triggerPushEvent }} == 'true' ];then | ||
echo "enableDubboRouter=true" >> $GITHUB_ENV | ||
|
@@ -207,6 +193,4 @@ runs: | |
echo "enableSpringLane=true" >> $GITHUB_ENV | ||
echo "enableDubboLane=true" >> $GITHUB_ENV | ||
echo "enableRemoval=true" >> $GITHUB_ENV | ||
echo "enableTagTransmission=true" >> $GITHUB_ENV | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: "Common operations" | ||
description: "do something common for tag transmission plugin test" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set up JDK ${{ env.javaVersion }} | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: ${{ env.javaVersion }} | ||
distribution: 'adopt' | ||
cache: maven | ||
- name: get zookeeper from cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: apache-zookeeper-3.6.3-bin.tar.gz | ||
key: ${{ runner.os }}-apache-zookeeper-3.6.3 | ||
- name: run zookeeper | ||
shell: bash | ||
run: | | ||
tar -zxf apache-zookeeper-3.6.3-bin.tar.gz | ||
bash apache-zookeeper-3.6.3-bin/bin/zkServer.sh start apache-zookeeper-3.6.3-bin/conf/zoo_sample.cfg | ||
- name: cache dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- name: cache agent | ||
uses: actions/cache@v3 | ||
with: | ||
path: sermant-agent-*/ | ||
key: ${{ runner.os }}-agent-${{ github.run_id }} | ||
- name: entry | ||
uses: ./.github/actions/common/entry | ||
with: | ||
log-dir: ./logs/tag-transmission/common | ||
- name: package common demos | ||
shell: bash | ||
run: | | ||
mvn package -DskipTests --file sermant-integration-tests/tag-transmission-test/pom.xml | ||
- name: start common httpserver | ||
shell: bash | ||
run: | | ||
nohup java -jar sermant-integration-tests/tag-transmission-test/httpserver-common-demo/target/httpserver-common-demo.jar > ${{ env.logDir }}/httpserver-common-demo.log 2>&1 & |
61 changes: 61 additions & 0 deletions
61
.github/actions/scenarios/tag-transmission/alibaba-dubbo/action.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: "Tag Transmission Plugin AlibabaDubbo Test" | ||
description: "Auto test for tag transmission by AlibabaDubbo" | ||
runs: | ||
using: composite | ||
steps: | ||
- name: entry | ||
uses: ./.github/actions/common/entry | ||
with: | ||
log-dir: ./logs/tag-transmission/alibaba-dubbo | ||
- name: alibaba.dubbo.version != 2.6.0 | ||
if: matrix.alibabaDubboVersion != '2.6.0' | ||
shell: bash | ||
run: | | ||
sed -i '/<dependency>/{:a;N;/<\/dependency>/!ba};/<groupId>com.101tec<\/groupId>\s*<artifactId>zkclient<\/artifactId>/d' \ | ||
sermant-integration-tests/tag-transmission-test/alibaba-dubbo-consumer-demo/pom.xml | ||
sed -i '/<dependency>/{:a;N;/<\/dependency>/!ba};/<groupId>com.101tec<\/groupId>\s*<artifactId>zkclient<\/artifactId>/d' \ | ||
sermant-integration-tests/tag-transmission-test/alibaba-dubbo-provider-demo/pom.xml | ||
- name: package demos | ||
shell: bash | ||
run: | | ||
mvn package -Dalibaba.dubbo.version=${{ matrix.alibabaDubboVersion }} -DskipTests -Palibaba-dubbo-test --file \ | ||
sermant-integration-tests/tag-transmission-test/pom.xml | ||
- name: start alibabadubbo provider demo | ||
shell: bash | ||
run: | | ||
nohup java -javaagent:sermant-agent-${{ env.sermantVersion }}/agent/sermant-agent.jar=appName=default -jar \ | ||
-Dsermant_log_dir=${{ env.logDir }}/alibaba-dubbo-provider \ | ||
sermant-integration-tests/tag-transmission-test/alibaba-dubbo-provider-demo/target/alibaba-dubbo-provider-demo.jar > ${{ env.logDir }}/alibaba-dubbo-provider.log 2>&1 & | ||
- name: start alibabadubbo consumer demo | ||
shell: bash | ||
run: | | ||
sleep 5s | ||
nohup java -javaagent:sermant-agent-${{ env.sermantVersion }}/agent/sermant-agent.jar=appName=default -jar \ | ||
-Dsermant_log_dir=${{ env.logDir }}/alibaba-dubbo-consumer \ | ||
sermant-integration-tests/tag-transmission-test/alibaba-dubbo-consumer-demo/target/alibaba-dubbo-consumer-demo.jar > ${{ env.logDir }}/alibaba-dubbo-consumer.log 2>&1 & | ||
- name: waiting for services start | ||
shell: bash | ||
run: | | ||
ps -ef | grep java | ||
bash ./sermant-integration-tests/scripts/checkService.sh http://127.0.0.1:9040/common/httpServer 120 | ||
bash ./sermant-integration-tests/scripts/checkService.sh http://127.0.0.1:9041/alibabaDubbo/testAlibabaDubbo 120 | ||
- name: test alibabadubbo | ||
shell: bash | ||
run: | | ||
mvn test -Dtag.transmission.integration.test.type=ALIBABA_DUBBO --file \ | ||
sermant-integration-tests/tag-transmission-test/tag-transmission-integration-test/pom.xml | ||
- name: exit | ||
if: always() | ||
uses: ./.github/actions/common/exit | ||
with: | ||
processor-keyword: httpserver-common|alibaba-dubbo | ||
- name: if failure then upload error log | ||
uses: actions/upload-artifact@v3 | ||
if: ${{ failure() || cancelled() }} | ||
with: | ||
name: (${{ github.job }})-tag-transmission-alibaba-dubbo-(${{ matrix.alibabaDubboVersion }}-logs | ||
path: | | ||
./*.log | ||
./logs/** | ||
if-no-files-found: warn | ||
retention-days: 2 |
53 changes: 53 additions & 0 deletions
53
.github/actions/scenarios/tag-transmission/apache-dubbo/action.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: "Tag Transmission Plugin ApacheDubbo Test" | ||
description: "Auto test for tag transmission by ApacheDubbo" | ||
runs: | ||
using: composite | ||
steps: | ||
- name: entry | ||
uses: ./.github/actions/common/entry | ||
with: | ||
log-dir: ./logs/tag-transmission/apache-dubbo | ||
- name: package demos | ||
shell: bash | ||
run: | | ||
mvn package -Dapache.dubbo.version=${{ matrix.apacheDubboVersion }} -DskipTests -Papache-dubbo-test --file \ | ||
sermant-integration-tests/tag-transmission-test/pom.xml | ||
- name: start apachedubbo provider demo | ||
shell: bash | ||
run: | | ||
nohup java -javaagent:sermant-agent-${{ env.sermantVersion }}/agent/sermant-agent.jar=appName=default -jar \ | ||
-Dsermant_log_dir=${{ env.logDir }}/apache-dubbo-provider \ | ||
sermant-integration-tests/tag-transmission-test/apache-dubbo-provider-demo/target/apache-dubbo-provider-demo.jar > ${{ env.logDir }}/apache-dubbo-provider.log 2>&1 & | ||
- name: start apachedubbo consumer demo | ||
shell: bash | ||
run: | | ||
sleep 5s | ||
nohup java -javaagent:sermant-agent-${{ env.sermantVersion }}/agent/sermant-agent.jar=appName=default -jar \ | ||
-Dsermant_log_dir=${{ env.logDir }}/apache-dubbo-consumer \ | ||
sermant-integration-tests/tag-transmission-test/apache-dubbo-consumer-demo/target/apache-dubbo-consumer-demo.jar > ${{ env.logDir }}/apache-dubbo-consumer.log 2>&1 & | ||
- name: waiting for services start | ||
shell: bash | ||
run: | | ||
ps -ef | grep java | ||
bash ./sermant-integration-tests/scripts/checkService.sh http://127.0.0.1:9040/common/httpServer 120 | ||
bash ./sermant-integration-tests/scripts/checkService.sh http://127.0.0.1:9043/apacheDubbo/testApacheDubbo 120 | ||
- name: test apachedubbo | ||
shell: bash | ||
run: | | ||
mvn test -Dtag.transmission.integration.test.type=APACHE_DUBBO --file \ | ||
sermant-integration-tests/tag-transmission-test/tag-transmission-integration-test/pom.xml | ||
- name: exit | ||
if: always() | ||
uses: ./.github/actions/common/exit | ||
with: | ||
processor-keyword: httpserver-common|apache-dubbo | ||
- name: if failure then upload error log | ||
uses: actions/upload-artifact@v3 | ||
if: ${{ failure() || cancelled() }} | ||
with: | ||
name: (${{ github.job }})-tag-transmission-apache-dubbo-(${{ matrix.apacheDubboVersion }}-logs | ||
path: | | ||
./*.log | ||
./logs/** | ||
if-no-files-found: warn | ||
retention-days: 2 |
46 changes: 46 additions & 0 deletions
46
.github/actions/scenarios/tag-transmission/config/action.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: "Tag Transmission Plugin Config Test" | ||
description: "Auto test for tag transmission by Config" | ||
runs: | ||
using: composite | ||
steps: | ||
- name: entry | ||
uses: ./.github/actions/common/entry | ||
with: | ||
log-dir: ./logs/tag-transmission/config | ||
- name: package demos | ||
shell: bash | ||
run: | | ||
mvn package -DskipTests -Pconfig-test --file \ | ||
sermant-integration-tests/tag-transmission-test/pom.xml | ||
- name: start config demo | ||
shell: bash | ||
run: | | ||
nohup java -javaagent:sermant-agent-${{ env.sermantVersion }}/agent/sermant-agent.jar=appName=default -jar \ | ||
-Dsermant_log_dir=${{ env.logDir }}/crossthread \ | ||
sermant-integration-tests/tag-transmission-test/tomcat-demo/target/tomcat-demo.jar > ${{ env.logDir }}/tomcat.log 2>&1 & | ||
- name: waiting for services start | ||
shell: bash | ||
run: | | ||
ps -ef | grep java | ||
bash ./sermant-integration-tests/scripts/checkService.sh http://127.0.0.1:9040/common/httpServer 120 | ||
bash ./sermant-integration-tests/scripts/checkService.sh http://127.0.0.1:9052/tomcat/testConfig 120 | ||
- name: test config | ||
shell: bash | ||
run: | | ||
mvn test -Dtag.transmission.integration.test.type=CONFIG --file \ | ||
sermant-integration-tests/tag-transmission-test/tag-transmission-integration-test/pom.xml | ||
- name: exit | ||
if: always() | ||
uses: ./.github/actions/common/exit | ||
with: | ||
processor-keyword: httpserver-common|tomcat | ||
- name: if failure then upload error log | ||
uses: actions/upload-artifact@v3 | ||
if: ${{ failure() || cancelled() }} | ||
with: | ||
name: (${{ github.job }})-tag-transmission-config-logs | ||
path: | | ||
./*.log | ||
./logs/** | ||
if-no-files-found: warn | ||
retention-days: 2 |
46 changes: 46 additions & 0 deletions
46
.github/actions/scenarios/tag-transmission/crossthread/action.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: "Tag Transmission Plugin CrossThread Test" | ||
description: "Auto test for tag transmission by CrossThread" | ||
runs: | ||
using: composite | ||
steps: | ||
- name: entry | ||
uses: ./.github/actions/common/entry | ||
with: | ||
log-dir: ./logs/tag-transmission/crossthread | ||
- name: package demos | ||
shell: bash | ||
run: | | ||
mvn package -DskipTests -Pcrossthread-test --file \ | ||
sermant-integration-tests/tag-transmission-test/pom.xml | ||
- name: start crossthread demo | ||
shell: bash | ||
run: | | ||
nohup java -javaagent:sermant-agent-${{ env.sermantVersion }}/agent/sermant-agent.jar=appName=default -jar \ | ||
-Dsermant_log_dir=${{ env.logDir }}/crossthread \ | ||
sermant-integration-tests/tag-transmission-test/crossthread-demo/target/crossthread-demo.jar > ${{ env.logDir }}/crossthread.log 2>&1 & | ||
- name: waiting for services start | ||
shell: bash | ||
run: | | ||
ps -ef | grep java | ||
bash ./sermant-integration-tests/scripts/checkService.sh http://127.0.0.1:9040/common/httpServer 120 | ||
bash ./sermant-integration-tests/scripts/checkService.sh http://127.0.0.1:9045/thread/testNewThread 120 | ||
- name: test crossthread | ||
shell: bash | ||
run: | | ||
mvn test -Dtag.transmission.integration.test.type=CROSS_THREAD --file \ | ||
sermant-integration-tests/tag-transmission-test/tag-transmission-integration-test/pom.xml | ||
- name: exit | ||
if: always() | ||
uses: ./.github/actions/common/exit | ||
with: | ||
processor-keyword: httpserver-common|crossthread | ||
- name: if failure then upload error log | ||
uses: actions/upload-artifact@v3 | ||
if: ${{ failure() || cancelled() }} | ||
with: | ||
name: (${{ github.job }})-tag-transmission-crossthread-logs | ||
path: | | ||
./*.log | ||
./logs/** | ||
if-no-files-found: warn | ||
retention-days: 2 |
52 changes: 52 additions & 0 deletions
52
.github/actions/scenarios/tag-transmission/grpc/action.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: "Tag Transmission Plugin Grpc Test" | ||
description: "Auto test for tag transmission by Grpc" | ||
runs: | ||
using: composite | ||
steps: | ||
- name: entry | ||
uses: ./.github/actions/common/entry | ||
with: | ||
log-dir: ./logs/tag-transmission/grpc | ||
- name: package demos | ||
shell: bash | ||
run: | | ||
mvn package -Dgrpc.version=${{ matrix.grpcVersion }} -DskipTests -Pgrpc-test --file \ | ||
sermant-integration-tests/tag-transmission-test/pom.xml | ||
- name: start grpc client demo | ||
shell: bash | ||
run: | | ||
nohup java -javaagent:sermant-agent-${{ env.sermantVersion }}/agent/sermant-agent.jar=appName=default -jar \ | ||
-Dsermant_log_dir=${{ env.logDir }}/grpc-client \ | ||
sermant-integration-tests/tag-transmission-test/grpc-client-demo/target/grpc-client-demo.jar > ${{ env.logDir }}/grpc-client.log 2>&1 & | ||
- name: start grpc server demo | ||
shell: bash | ||
run: | | ||
nohup java -javaagent:sermant-agent-${{ env.sermantVersion }}/agent/sermant-agent.jar=appName=default -jar \ | ||
-Dsermant_log_dir=${{ env.logDir }}/grpc-server \ | ||
sermant-integration-tests/tag-transmission-test/grpc-server-demo/target/grpc-server-demo.jar > ${{ env.logDir }}/grpc-server.log 2>&1 & | ||
- name: waiting for services start | ||
shell: bash | ||
run: | | ||
ps -ef | grep java | ||
bash ./sermant-integration-tests/scripts/checkService.sh http://127.0.0.1:9040/common/httpServer 120 | ||
bash ./sermant-integration-tests/scripts/checkService.sh http://127.0.0.1:9046/grpc/testGrpcByStub 120 | ||
- name: test grpc | ||
shell: bash | ||
run: | | ||
mvn test -Dtag.transmission.integration.test.type=GRPC --file \ | ||
sermant-integration-tests/tag-transmission-test/tag-transmission-integration-test/pom.xml | ||
- name: exit | ||
if: always() | ||
uses: ./.github/actions/common/exit | ||
with: | ||
processor-keyword: httpserver-common|grpc | ||
- name: if failure then upload error log | ||
uses: actions/upload-artifact@v3 | ||
if: ${{ failure() || cancelled() }} | ||
with: | ||
name: (${{ github.job }})-tag-transmission-grpc-(${{ matrix.grpcVersion }}-logs | ||
path: | | ||
./*.log | ||
./logs/** | ||
if-no-files-found: warn | ||
retention-days: 2 |
46 changes: 46 additions & 0 deletions
46
.github/actions/scenarios/tag-transmission/httpclientv3/action.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: "Tag Transmission Plugin HttpClientV3 Test" | ||
description: "Auto test for tag transmission by httpclientv3" | ||
runs: | ||
using: composite | ||
steps: | ||
- name: entry | ||
uses: ./.github/actions/common/entry | ||
with: | ||
log-dir: ./logs/tag-transmission/httpclientv3 | ||
- name: package demos | ||
shell: bash | ||
run: | | ||
mvn package -Dhttpclient3x.version=${{ matrix.httpclientVersion }} -DskipTests -Phttpclientv3-test --file \ | ||
sermant-integration-tests/tag-transmission-test/pom.xml | ||
- name: start httpclientv3 demo | ||
shell: bash | ||
run: | | ||
nohup java -javaagent:sermant-agent-${{ env.sermantVersion }}/agent/sermant-agent.jar=appName=default -jar \ | ||
-Dsermant_log_dir=${{ env.logDir }}/sermant \ | ||
sermant-integration-tests/tag-transmission-test/httpclientv3-demo/target/httpclientv3-demo.jar > ${{ env.logDir }}/httpclientv3.log 2>&1 & | ||
- name: waiting for services start | ||
shell: bash | ||
run: | | ||
ps -ef | grep java | ||
bash ./sermant-integration-tests/scripts/checkService.sh http://127.0.0.1:9040/common/httpServer 120 | ||
bash ./sermant-integration-tests/scripts/checkService.sh http://127.0.0.1:9048/httpClientV3/testHttpClientV3 120 | ||
- name: test httpclientv3 | ||
shell: bash | ||
run: | | ||
mvn test -Dtag.transmission.integration.test.type=HTTPCLIENTV3 --file \ | ||
sermant-integration-tests/tag-transmission-test/tag-transmission-integration-test/pom.xml | ||
- name: exit | ||
if: always() | ||
uses: ./.github/actions/common/exit | ||
with: | ||
processor-keyword: httpserver-common|httpclientv3 | ||
- name: if failure then upload error log | ||
uses: actions/upload-artifact@v3 | ||
if: ${{ failure() || cancelled() }} | ||
with: | ||
name: (${{ github.job }})-tag-transmission-httpclientv3-(${{ matrix.httpClientVersion }}-logs | ||
path: | | ||
./*.log | ||
./logs/** | ||
if-no-files-found: warn | ||
retention-days: 2 |
Oops, something went wrong.