You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2019/10/31 11:07:22 UTC
[skywalking] branch master updated: [test/plugin] immigrate test
webflux scenario. (#3756)
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git
The following commit(s) were added to refs/heads/master by this push:
new 9bed3c7 [test/plugin] immigrate test webflux scenario. (#3756)
9bed3c7 is described below
commit 9bed3c7c42305db28dfd28b5f07bb058926925c4
Author: 于玉桔 <zh...@apache.org>
AuthorDate: Thu Oct 31 19:07:09 2019 +0800
[test/plugin] immigrate test webflux scenario. (#3756)
* add webflux testcase
---
Jenkinsfile-Agent-Test-2 | 10 +-
.../webflux-scenario/config/expectedData.yaml | 310 +++++++++++++++++++++
.../scenarios/webflux-scenario/configuration.yml | 21 ++
test/plugin/scenarios/webflux-scenario/pom.xml | 58 ++++
.../webflux-scenario/support-version.list | 34 +++
.../webflux-scenario/webflux-dist/bin/startup.sh | 24 ++
.../webflux-scenario/webflux-dist/pom.xml | 54 ++++
.../webflux-dist/src/main/assembly/assembly.xml | 46 +++
.../webflux-projectA-scenario/pom.xml | 72 +++++
.../testcase/sc/webflux/projectA/Application.java | 29 ++
.../projectA/controller/TestController.java | 61 ++++
.../sc/webflux/projectA/utils/HttpUtils.java | 51 ++++
.../src/main/resources/application.yml | 21 ++
.../webflux-projectB-scenario/pom.xml | 57 ++++
.../testcase/sc/webflux/projectB/Application.java | 29 ++
.../sc/webflux/projectB/config/CustomFilter.java | 44 +++
.../controller/TestAnnotationController.java | 51 ++++
.../projectB/route/RoutingConfiguration.java | 37 +++
.../sc/webflux/projectB/route/TestHandler.java | 39 +++
.../src/main/resources/application.yml | 18 ++
20 files changed, 1064 insertions(+), 2 deletions(-)
diff --git a/Jenkinsfile-Agent-Test-2 b/Jenkinsfile-Agent-Test-2
index a081d12..ad1d5f3 100755
--- a/Jenkinsfile-Agent-Test-2
+++ b/Jenkinsfile-Agent-Test-2
@@ -66,7 +66,7 @@ pipeline {
sh './mvnw -f test/plugin/pom.xml clean package -DskipTests -Dbuild_id=wl2_${BUILD_ID} docker:build'
}
}
- stage('Test Cases Report (156)') {
+ stage('Test Cases Report (174)') {
steps {
echo "reserve."
}
@@ -87,6 +87,12 @@ pipeline {
}
}
+ stage('spring-webflux 2.x (18)') {
+ steps {
+ sh 'bash test/plugin/run.sh --build_id=wl2_${BUILD_ID} webflux-scenario'
+ }
+ }
+
stage('dubbo 2.5.x-2.6.x (10)') {
steps {
sh 'bash test/plugin/run.sh --build_id=wl2_${BUILD_ID} dubbo-2.5.x-scenario'
@@ -148,4 +154,4 @@ pipeline {
deleteDir()
}
}
-}
\ No newline at end of file
+}
diff --git a/test/plugin/scenarios/webflux-scenario/config/expectedData.yaml b/test/plugin/scenarios/webflux-scenario/config/expectedData.yaml
new file mode 100644
index 0000000..cb167cd
--- /dev/null
+++ b/test/plugin/scenarios/webflux-scenario/config/expectedData.yaml
@@ -0,0 +1,310 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+registryItems:
+ applications:
+ - {webflux-projectB-scenario: nq 0}
+ - {webflux-projectA-scenario: nq 0}
+ instances:
+ - {webflux-projectB-scenario: 1}
+ - {webflux-projectA-scenario: 1}
+ operationNames:
+ - webflux-projectB-scenario: [org.apache.skywalking.apm.testcase.sc.webflux.projectB.controller.TestAnnotationController.success,
+ org.apache.skywalking.apm.testcase.sc.webflux.projectB.controller.TestAnnotationController.hello,
+ WEBFLUX.handle, org.apache.skywalking.apm.testcase.sc.webflux.projectB.controller.TestAnnotationController.error,
+ org.apache.skywalking.apm.testcase.sc.webflux.projectB.controller.TestAnnotationController.healthCheck,
+ RoutingConfiguration.org.apache.skywalking.apm.testcase.sc.webflux.projectB.route.TestHandler]
+ - webflux-projectA-scenario: [/testcase/annotation/mono/hello, /projectA/testcase,
+ /testcase/annotation/success, /testcase/annotation/healthCheck, /notFound, /projectA/healthCheck,
+ /testcase/route/error, /testcase/route/success, /testcase/annotation/error]
+ heartbeat: []
+segmentItems:
+ - applicationCode: webflux-projectB-scenario
+ segmentSize: nq 0
+ segments:
+ - segmentId: not null
+ spans:
+ - operationName: org.apache.skywalking.apm.testcase.sc.webflux.projectB.controller.TestAnnotationController.success
+ operationId: 0
+ parentSpanId: -1
+ spanId: 0
+ spanLayer: Http
+ startTime: not null
+ endTime: not null
+ componentId: 67
+ componentName: ''
+ isError: false
+ spanType: Entry
+ peer: ''
+ peerId: 0
+ tags:
+ - {key: url, value: not null}
+ refs:
+ - {parentEndpointId: 0, parentEndpoint: /projectA/testcase, networkAddressId: 0,
+ entryEndpointId: 0, refType: CrossProcess, parentSpanId: not null, parentTraceSegmentId: not null,
+ parentServiceInstanceId: not null, networkAddress: not null, entryEndpoint: /projectA/testcase,
+ entryServiceInstanceId: not null}
+ - segmentId: not null
+ spans:
+ - operationName: org.apache.skywalking.apm.testcase.sc.webflux.projectB.controller.TestAnnotationController.error
+ operationId: 0
+ parentSpanId: -1
+ spanId: 0
+ spanLayer: Http
+ startTime: not null
+ endTime: not null
+ componentId: 67
+ componentName: ''
+ isError: true
+ spanType: Entry
+ peer: ''
+ peerId: 0
+ tags:
+ - {key: url, value: not null}
+ - {key: status_code, value: '500'}
+ logs:
+ - logEvent:
+ - {key: event, value: error}
+ - {key: error.kind, value: java.lang.RuntimeException}
+ - {key: message, value: test_error}
+ - {key: stack, value: not null}
+ refs:
+ - {parentEndpointId: 0, parentEndpoint: /projectA/testcase, networkAddressId: 0,
+ entryEndpointId: 0, refType: CrossProcess, parentSpanId: not null, parentTraceSegmentId: not null,
+ parentServiceInstanceId: not null, networkAddress: not null, entryEndpoint: /projectA/testcase,
+ entryServiceInstanceId: not null}
+ - segmentId: not null
+ spans:
+ - operationName: RoutingConfiguration.org.apache.skywalking.apm.testcase.sc.webflux.projectB.route.TestHandler
+ operationId: 0
+ parentSpanId: -1
+ spanId: 0
+ spanLayer: Http
+ startTime: not null
+ endTime: not null
+ componentId: 67
+ componentName: ''
+ isError: false
+ spanType: Entry
+ peer: ''
+ peerId: 0
+ tags:
+ - {key: url, value: not null}
+ refs:
+ - {parentEndpointId: 0, parentEndpoint: /projectA/testcase, networkAddressId: 0,
+ entryEndpointId: 0, refType: CrossProcess, parentSpanId: not null, parentTraceSegmentId: not null,
+ parentServiceInstanceId: not null, networkAddress: not null, entryEndpoint: /projectA/testcase,
+ entryServiceInstanceId: not null}
+ - segmentId: not null
+ spans:
+ - operationName: RoutingConfiguration.org.apache.skywalking.apm.testcase.sc.webflux.projectB.route.TestHandler
+ operationId: 0
+ parentSpanId: -1
+ spanId: 0
+ spanLayer: Http
+ startTime: not null
+ endTime: not null
+ componentId: 67
+ componentName: ''
+ isError: true
+ spanType: Entry
+ peer: ''
+ peerId: 0
+ tags:
+ - {key: url, value: not null}
+ - {key: status_code, value: '500'}
+ logs:
+ - logEvent:
+ - {key: event, value: error}
+ - {key: error.kind, value: java.lang.RuntimeException}
+ - {key: message, value: test_error}
+ - {key: stack, value: not null}
+ refs:
+ - {parentEndpointId: 0, parentEndpoint: /projectA/testcase, networkAddressId: 0,
+ entryEndpointId: 0, refType: CrossProcess, parentSpanId: not null, parentTraceSegmentId: not null,
+ parentServiceInstanceId: not null, networkAddress: not null, entryEndpoint: /projectA/testcase,
+ entryServiceInstanceId: not null}
+ - segmentId: not null
+ spans:
+ - operationName: WEBFLUX.handle
+ operationId: 0
+ parentSpanId: -1
+ spanId: 0
+ spanLayer: Http
+ startTime: not null
+ endTime: not null
+ componentId: 67
+ componentName: ''
+ isError: true
+ spanType: Entry
+ peer: ''
+ peerId: 0
+ tags:
+ - {key: url, value: not null}
+ - {key: status_code, value: '404'}
+ logs:
+ - logEvent:
+ - {key: event, value: error}
+ - {key: error.kind, value: org.springframework.web.server.ResponseStatusException}
+ - {key: message, value: not null}
+ - {key: stack, value: not null}
+ refs:
+ - {parentEndpointId: 0, parentEndpoint: /projectA/testcase, networkAddressId: 0,
+ entryEndpointId: 0, refType: CrossProcess, parentSpanId: not null, parentTraceSegmentId: not null,
+ parentServiceInstanceId: not null, networkAddress: not null, entryEndpoint: /projectA/testcase,
+ entryServiceInstanceId: not null}
+ - segmentId: not null
+ spans:
+ - operationName: org.apache.skywalking.apm.testcase.sc.webflux.projectB.controller.TestAnnotationController.hello
+ operationId: 0
+ parentSpanId: -1
+ spanId: 0
+ spanLayer: Http
+ startTime: not null
+ endTime: not null
+ componentId: 67
+ componentName: ''
+ isError: false
+ spanType: Entry
+ peer: ''
+ peerId: 0
+ tags:
+ - {key: url, value: not null}
+ refs:
+ - {parentEndpointId: 0, parentEndpoint: /projectA/testcase, networkAddressId: 0,
+ entryEndpointId: 0, refType: CrossProcess, parentSpanId: not null, parentTraceSegmentId: not null,
+ parentServiceInstanceId: not null, networkAddress: not null, entryEndpoint: /projectA/testcase,
+ entryServiceInstanceId: not null}
+ - applicationCode: webflux-projectA-scenario
+ segmentSize: nq 0
+ segments:
+ - segmentId: not null
+ spans:
+ - operationName: /testcase/annotation/success
+ operationId: 0
+ parentSpanId: 0
+ spanId: 1
+ spanLayer: Http
+ startTime: not null
+ endTime: not null
+ componentId: 2
+ componentName: ''
+ isError: false
+ spanType: Exit
+ peer: not null
+ peerId: 0
+ tags:
+ - {key: url, value: not null}
+ - {key: http.method, value: GET}
+ - operationName: /testcase/annotation/error
+ operationId: 0
+ parentSpanId: 0
+ spanId: 2
+ spanLayer: Http
+ startTime: not null
+ endTime: not null
+ componentId: 2
+ componentName: ''
+ isError: true
+ spanType: Exit
+ peer: not null
+ peerId: 0
+ tags:
+ - {key: url, value: not null}
+ - {key: http.method, value: GET}
+ - {key: status_code, value: '500'}
+ - operationName: /testcase/route/success
+ operationId: 0
+ parentSpanId: 0
+ spanId: 3
+ spanLayer: Http
+ startTime: not null
+ endTime: not null
+ componentId: 2
+ componentName: ''
+ isError: false
+ spanType: Exit
+ peer: not null
+ peerId: 0
+ tags:
+ - {key: url, value: not null}
+ - {key: http.method, value: GET}
+ - operationName: /testcase/route/error
+ operationId: 0
+ parentSpanId: 0
+ spanId: 4
+ spanLayer: Http
+ startTime: not null
+ endTime: not null
+ componentId: 2
+ componentName: ''
+ isError: true
+ spanType: Exit
+ peer: not null
+ peerId: 0
+ tags:
+ - {key: url, value: not null}
+ - {key: http.method, value: GET}
+ - {key: status_code, value: '500'}
+ - operationName: /notFound
+ operationId: 0
+ parentSpanId: 0
+ spanId: 5
+ spanLayer: Http
+ startTime: not null
+ endTime: not null
+ componentId: 2
+ componentName: ''
+ isError: true
+ spanType: Exit
+ peer: not null
+ peerId: 0
+ tags:
+ - {key: url, value: not null}
+ - {key: http.method, value: GET}
+ - {key: status_code, value: '404'}
+ - operationName: /testcase/annotation/mono/hello
+ operationId: 0
+ parentSpanId: 0
+ spanId: 6
+ spanLayer: Http
+ startTime: not null
+ endTime: not null
+ componentId: 2
+ componentName: ''
+ isError: false
+ spanType: Exit
+ peer: not null
+ peerId: 0
+ tags:
+ - {key: url, value: not null}
+ - {key: http.method, value: GET}
+ - operationName: /projectA/testcase
+ operationId: 0
+ parentSpanId: -1
+ spanId: 0
+ spanLayer: Http
+ startTime: not null
+ endTime: not null
+ componentId: 1
+ componentName: ''
+ isError: false
+ spanType: Entry
+ peer: ''
+ peerId: 0
+ tags:
+ - {key: url, value: not null}
+ - {key: http.method, value: GET}
\ No newline at end of file
diff --git a/test/plugin/scenarios/webflux-scenario/configuration.yml b/test/plugin/scenarios/webflux-scenario/configuration.yml
new file mode 100644
index 0000000..37b70f9
--- /dev/null
+++ b/test/plugin/scenarios/webflux-scenario/configuration.yml
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+type: jvm
+entryService: http://localhost:8080/projectA/testcase
+healthCheck: http://localhost:8080/projectA/healthCheck
+startScript: ./bin/startup.sh
+framework: spring-webflux
\ No newline at end of file
diff --git a/test/plugin/scenarios/webflux-scenario/pom.xml b/test/plugin/scenarios/webflux-scenario/pom.xml
new file mode 100644
index 0000000..8502b98
--- /dev/null
+++ b/test/plugin/scenarios/webflux-scenario/pom.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ ~
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.skywalking</groupId>
+ <artifactId>webflux-scenario</artifactId>
+ <packaging>pom</packaging>
+ <version>5.0.0</version>
+ <modules>
+ <module>webflux-projectA-scenario</module>
+ <module>webflux-projectB-scenario</module>
+ <module>webflux-dist</module>
+ </modules>
+
+ <name>skywalking-webflux-scenario</name>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <test.framework.version>2.0.0.RELEASE</test.framework.version>
+ <docker.image.version>${test.framework.version}</docker.image.version>
+ </properties>
+
+ <build>
+ <finalName>webflux-scenario</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.6.0</version>
+ <configuration>
+ <source>1.8</source>
+ <target>1.8</target>
+ <encoding>${project.build.sourceEncoding}</encoding>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/test/plugin/scenarios/webflux-scenario/support-version.list b/test/plugin/scenarios/webflux-scenario/support-version.list
new file mode 100644
index 0000000..13e43a5
--- /dev/null
+++ b/test/plugin/scenarios/webflux-scenario/support-version.list
@@ -0,0 +1,34 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+2.0.0.RELEASE
+2.0.1.RELEASE
+2.0.2.RELEASE
+2.0.3.RELEASE
+2.0.4.RELEASE
+2.0.5.RELEASE
+2.0.6.RELEASE
+2.0.7.RELEASE
+2.0.8.RELEASE
+2.0.9.RELEASE
+2.1.0.RELEASE
+2.1.1.RELEASE
+2.1.2.RELEASE
+2.1.3.RELEASE
+2.1.4.RELEASE
+2.1.5.RELEASE
+2.1.6.RELEASE
+2.1.7.RELEASE
\ No newline at end of file
diff --git a/test/plugin/scenarios/webflux-scenario/webflux-dist/bin/startup.sh b/test/plugin/scenarios/webflux-scenario/webflux-dist/bin/startup.sh
new file mode 100644
index 0000000..dc04739
--- /dev/null
+++ b/test/plugin/scenarios/webflux-scenario/webflux-dist/bin/startup.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+home="$(cd "$(dirname $0)"; pwd)"
+
+java -jar ${agent_opts} "-Dskywalking.agent.service_name=webflux-projectA-scenario" ${home}/../libs/webflux-projectA-scenario.jar &
+sleep 1
+
+java -jar ${agent_opts} "-Dskywalking.agent.service_name=webflux-projectB-scenario" ${home}/../libs/webflux-projectB-scenario.jar &
diff --git a/test/plugin/scenarios/webflux-scenario/webflux-dist/pom.xml b/test/plugin/scenarios/webflux-scenario/webflux-dist/pom.xml
new file mode 100644
index 0000000..019316d
--- /dev/null
+++ b/test/plugin/scenarios/webflux-scenario/webflux-dist/pom.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ ~
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>org.apache.skywalking</groupId>
+ <artifactId>webflux-scenario</artifactId>
+ <version>5.0.0</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>webflux-dist</artifactId>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>assemble</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assembly/assembly.xml</descriptor>
+ </descriptors>
+ <outputDirectory>../target/</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/test/plugin/scenarios/webflux-scenario/webflux-dist/src/main/assembly/assembly.xml b/test/plugin/scenarios/webflux-scenario/webflux-dist/src/main/assembly/assembly.xml
new file mode 100644
index 0000000..7bc3d10
--- /dev/null
+++ b/test/plugin/scenarios/webflux-scenario/webflux-dist/src/main/assembly/assembly.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ ~
+ -->
+<assembly
+ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+ <formats>
+ <format>zip</format>
+ </formats>
+
+ <fileSets>
+ <fileSet>
+ <directory>./bin</directory>
+ <fileMode>0775</fileMode>
+ </fileSet>
+ </fileSets>
+
+ <files>
+ <file>
+ <source>../webflux-projectA-scenario/target/webflux-projectA-scenario.jar</source>
+ <outputDirectory>./libs</outputDirectory>
+ <fileMode>0775</fileMode>
+ </file>
+ <file>
+ <source>../webflux-projectB-scenario/target/webflux-projectB-scenario.jar</source>
+ <outputDirectory>./libs</outputDirectory>
+ <fileMode>0775</fileMode>
+ </file>
+ </files>
+</assembly>
\ No newline at end of file
diff --git a/test/plugin/scenarios/webflux-scenario/webflux-projectA-scenario/pom.xml b/test/plugin/scenarios/webflux-scenario/webflux-projectA-scenario/pom.xml
new file mode 100644
index 0000000..0d1389a
--- /dev/null
+++ b/test/plugin/scenarios/webflux-scenario/webflux-projectA-scenario/pom.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ ~
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>org.apache.skywalking</groupId>
+ <artifactId>webflux-scenario</artifactId>
+ <version>5.0.0</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>webflux-projectA-scenario</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-web</artifactId>
+ <version>${test.framework.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ <version>4.5.6</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <finalName>webflux-projectA-scenario</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-maven-plugin</artifactId>
+ <version>1.5.9.RELEASE</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>repackage</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <pluginRepositories>
+ <pluginRepository>
+ <id>spring-snapshots</id>
+ <url>http://repo.spring.io/snapshot</url>
+ </pluginRepository>
+ <pluginRepository>
+ <id>spring-milestones</id>
+ <url>http://repo.spring.io/milestone</url>
+ </pluginRepository>
+ </pluginRepositories>
+</project>
\ No newline at end of file
diff --git a/test/plugin/scenarios/webflux-scenario/webflux-projectA-scenario/src/main/java/org/apache/skywalking/apm/testcase/sc/webflux/projectA/Application.java b/test/plugin/scenarios/webflux-scenario/webflux-projectA-scenario/src/main/java/org/apache/skywalking/apm/testcase/sc/webflux/projectA/Application.java
new file mode 100644
index 0000000..50d9273
--- /dev/null
+++ b/test/plugin/scenarios/webflux-scenario/webflux-projectA-scenario/src/main/java/org/apache/skywalking/apm/testcase/sc/webflux/projectA/Application.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.testcase.sc.webflux.projectA;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class Application {
+
+ public static void main(String[] args) {
+ SpringApplication.run(Application.class, args);
+ }
+}
diff --git a/test/plugin/scenarios/webflux-scenario/webflux-projectA-scenario/src/main/java/org/apache/skywalking/apm/testcase/sc/webflux/projectA/controller/TestController.java b/test/plugin/scenarios/webflux-scenario/webflux-projectA-scenario/src/main/java/org/apache/skywalking/apm/testcase/sc/webflux/projectA/controller/TestController.java
new file mode 100644
index 0000000..85cbffc
--- /dev/null
+++ b/test/plugin/scenarios/webflux-scenario/webflux-projectA-scenario/src/main/java/org/apache/skywalking/apm/testcase/sc/webflux/projectA/controller/TestController.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.testcase.sc.webflux.projectA.controller;
+
+import org.apache.skywalking.apm.testcase.sc.webflux.projectA.utils.HttpUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.io.IOException;
+
+@RestController
+public class TestController {
+
+ @Value("${projectB.host:localhost:18080}")
+ private String hostBAddress;
+
+ @Autowired
+ private HttpUtils httpUtils;
+
+ @RequestMapping("/testcase")
+ public String testcase() throws IOException {
+ visit("http://" + hostBAddress + "/testcase/annotation/success");
+ visit("http://" + hostBAddress + "/testcase/annotation/error");
+ visit("http://" + hostBAddress + "/testcase/route/success");
+ visit("http://" + hostBAddress + "/testcase/route/error");
+ visit("http://" + hostBAddress + "/notFound");
+ visit("http://" + hostBAddress + "/testcase/annotation/mono/hello");
+ return "test";
+ }
+
+ @RequestMapping("/healthCheck")
+ public String healthCheck() throws IOException {
+ httpUtils.visit("http://" + hostBAddress + "/testcase/annotation/healthCheck");
+ return "test";
+ }
+
+ private void visit(String path){
+ try {
+ httpUtils.visit(path);
+ } catch (Exception i) {
+
+ }
+ }
+}
diff --git a/test/plugin/scenarios/webflux-scenario/webflux-projectA-scenario/src/main/java/org/apache/skywalking/apm/testcase/sc/webflux/projectA/utils/HttpUtils.java b/test/plugin/scenarios/webflux-scenario/webflux-projectA-scenario/src/main/java/org/apache/skywalking/apm/testcase/sc/webflux/projectA/utils/HttpUtils.java
new file mode 100644
index 0000000..f9c3878
--- /dev/null
+++ b/test/plugin/scenarios/webflux-scenario/webflux-projectA-scenario/src/main/java/org/apache/skywalking/apm/testcase/sc/webflux/projectA/utils/HttpUtils.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.testcase.sc.webflux.projectA.utils;
+
+import org.apache.http.HttpEntity;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.ResponseHandler;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.util.EntityUtils;
+import org.springframework.stereotype.Component;
+
+import java.io.IOException;
+
+@Component
+public class HttpUtils {
+
+ public String visit(String url) throws IOException {
+ CloseableHttpClient httpclient = HttpClients.createDefault();
+ try {
+ HttpGet httpget = new HttpGet(url);
+ ResponseHandler<String> responseHandler = new ResponseHandler<String>() {
+ public String handleResponse(
+ org.apache.http.HttpResponse response) throws ClientProtocolException, IOException {
+ HttpEntity entity = response.getEntity();
+ return entity != null ? EntityUtils.toString(entity) : null;
+ }
+
+ };
+ return httpclient.execute(httpget, responseHandler);
+ } finally {
+ httpclient.close();
+ }
+ }
+}
diff --git a/test/plugin/scenarios/webflux-scenario/webflux-projectA-scenario/src/main/resources/application.yml b/test/plugin/scenarios/webflux-scenario/webflux-projectA-scenario/src/main/resources/application.yml
new file mode 100644
index 0000000..80e791c
--- /dev/null
+++ b/test/plugin/scenarios/webflux-scenario/webflux-projectA-scenario/src/main/resources/application.yml
@@ -0,0 +1,21 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+server:
+ servlet:
+ context-path: /projectA
+ port: 8080
\ No newline at end of file
diff --git a/test/plugin/scenarios/webflux-scenario/webflux-projectB-scenario/pom.xml b/test/plugin/scenarios/webflux-scenario/webflux-projectB-scenario/pom.xml
new file mode 100644
index 0000000..792dc6d
--- /dev/null
+++ b/test/plugin/scenarios/webflux-scenario/webflux-projectB-scenario/pom.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ ~
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <artifactId>webflux-scenario</artifactId>
+ <groupId>org.apache.skywalking</groupId>
+ <version>5.0.0</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>webflux-projectB-scenario</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-webflux</artifactId>
+ <version>${test.framework.version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <finalName>webflux-projectB-scenario</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-maven-plugin</artifactId>
+ <version>1.5.9.RELEASE</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>repackage</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
\ No newline at end of file
diff --git a/test/plugin/scenarios/webflux-scenario/webflux-projectB-scenario/src/main/java/org/apache/skywalking/apm/testcase/sc/webflux/projectB/Application.java b/test/plugin/scenarios/webflux-scenario/webflux-projectB-scenario/src/main/java/org/apache/skywalking/apm/testcase/sc/webflux/projectB/Application.java
new file mode 100644
index 0000000..733fdf4
--- /dev/null
+++ b/test/plugin/scenarios/webflux-scenario/webflux-projectB-scenario/src/main/java/org/apache/skywalking/apm/testcase/sc/webflux/projectB/Application.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.testcase.sc.webflux.projectB;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class Application {
+
+ public static void main(String[] args) {
+ SpringApplication.run(Application.class, args);
+ }
+}
diff --git a/test/plugin/scenarios/webflux-scenario/webflux-projectB-scenario/src/main/java/org/apache/skywalking/apm/testcase/sc/webflux/projectB/config/CustomFilter.java b/test/plugin/scenarios/webflux-scenario/webflux-projectB-scenario/src/main/java/org/apache/skywalking/apm/testcase/sc/webflux/projectB/config/CustomFilter.java
new file mode 100644
index 0000000..12abaea
--- /dev/null
+++ b/test/plugin/scenarios/webflux-scenario/webflux-projectB-scenario/src/main/java/org/apache/skywalking/apm/testcase/sc/webflux/projectB/config/CustomFilter.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.skywalking.apm.testcase.sc.webflux.projectB.config;
+
+import org.springframework.stereotype.Component;
+import org.springframework.web.server.ServerWebExchange;
+import org.springframework.web.server.ServerWebExchangeDecorator;
+import org.springframework.web.server.WebFilter;
+import org.springframework.web.server.WebFilterChain;
+import reactor.core.publisher.Mono;
+
+/**
+ * @author zhaoyuguang
+ */
+
+@Component
+public class CustomFilter implements WebFilter {
+
+ @Override
+ public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) {
+ return chain.filter(new MyServerWebExchangeDecorator(exchange));
+ }
+
+ public static class MyServerWebExchangeDecorator extends ServerWebExchangeDecorator {
+ public MyServerWebExchangeDecorator(ServerWebExchange delegate) {
+ super(delegate);
+ }
+ }
+
+}
diff --git a/test/plugin/scenarios/webflux-scenario/webflux-projectB-scenario/src/main/java/org/apache/skywalking/apm/testcase/sc/webflux/projectB/controller/TestAnnotationController.java b/test/plugin/scenarios/webflux-scenario/webflux-projectB-scenario/src/main/java/org/apache/skywalking/apm/testcase/sc/webflux/projectB/controller/TestAnnotationController.java
new file mode 100644
index 0000000..a9afbb5
--- /dev/null
+++ b/test/plugin/scenarios/webflux-scenario/webflux-projectB-scenario/src/main/java/org/apache/skywalking/apm/testcase/sc/webflux/projectB/controller/TestAnnotationController.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.testcase.sc.webflux.projectB.controller;
+
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import reactor.core.publisher.Mono;
+
+@RestController
+public class TestAnnotationController {
+
+ @RequestMapping("/testcase/annotation/healthCheck")
+ public String healthCheck() {
+ return "healthCheck";
+ }
+
+ @RequestMapping("/testcase/annotation/success")
+ public String success() {
+ return "1";
+ }
+
+ @RequestMapping("/testcase/annotation/error")
+ public String error() {
+ if (1 == 1) {
+ throw new RuntimeException("test_error");
+ }
+ return "1";
+ }
+
+ @GetMapping("/testcase/annotation/mono/hello")
+ public Mono<String> hello(@RequestBody(required = false) String body) {
+ return Mono.just("Hello World");
+ }
+}
diff --git a/test/plugin/scenarios/webflux-scenario/webflux-projectB-scenario/src/main/java/org/apache/skywalking/apm/testcase/sc/webflux/projectB/route/RoutingConfiguration.java b/test/plugin/scenarios/webflux-scenario/webflux-projectB-scenario/src/main/java/org/apache/skywalking/apm/testcase/sc/webflux/projectB/route/RoutingConfiguration.java
new file mode 100644
index 0000000..f185454
--- /dev/null
+++ b/test/plugin/scenarios/webflux-scenario/webflux-projectB-scenario/src/main/java/org/apache/skywalking/apm/testcase/sc/webflux/projectB/route/RoutingConfiguration.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.skywalking.apm.testcase.sc.webflux.projectB.route;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.reactive.function.server.RouterFunction;
+import org.springframework.web.reactive.function.server.RouterFunctions;
+import org.springframework.web.reactive.function.server.ServerResponse;
+
+import static org.springframework.web.reactive.function.server.RequestPredicates.GET;
+
+/**
+ * @author zhaoyuguang
+ */
+@Configuration
+public class RoutingConfiguration {
+ @Bean
+ public RouterFunction<ServerResponse> routerFunction(TestHandler testHandler) {
+ return RouterFunctions.route(GET("/testcase/route/{test}"), testHandler::test);
+ }
+
+}
diff --git a/test/plugin/scenarios/webflux-scenario/webflux-projectB-scenario/src/main/java/org/apache/skywalking/apm/testcase/sc/webflux/projectB/route/TestHandler.java b/test/plugin/scenarios/webflux-scenario/webflux-projectB-scenario/src/main/java/org/apache/skywalking/apm/testcase/sc/webflux/projectB/route/TestHandler.java
new file mode 100644
index 0000000..fb58d2b
--- /dev/null
+++ b/test/plugin/scenarios/webflux-scenario/webflux-projectB-scenario/src/main/java/org/apache/skywalking/apm/testcase/sc/webflux/projectB/route/TestHandler.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.skywalking.apm.testcase.sc.webflux.projectB.route;
+
+import org.springframework.http.MediaType;
+import org.springframework.stereotype.Component;
+import org.springframework.web.reactive.function.BodyInserters;
+import org.springframework.web.reactive.function.server.ServerRequest;
+import org.springframework.web.reactive.function.server.ServerResponse;
+import reactor.core.publisher.Mono;
+
+/**
+ * @author zhaoyuguang
+ */
+@Component
+public class TestHandler {
+
+ public Mono<ServerResponse> test(ServerRequest request) {
+ System.out.println(request.path());
+ if (request.path().contains("error")) {
+ throw new RuntimeException("test_error");
+ }
+ return ServerResponse.ok().contentType(MediaType.TEXT_PLAIN).body(BodyInserters.fromObject("route"));
+ }
+}
diff --git a/test/plugin/scenarios/webflux-scenario/webflux-projectB-scenario/src/main/resources/application.yml b/test/plugin/scenarios/webflux-scenario/webflux-projectB-scenario/src/main/resources/application.yml
new file mode 100644
index 0000000..629f92f
--- /dev/null
+++ b/test/plugin/scenarios/webflux-scenario/webflux-projectB-scenario/src/main/resources/application.yml
@@ -0,0 +1,18 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+server.port: 18080
\ No newline at end of file