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 2021/10/31 07:33:06 UTC

[skywalking-java] branch ext-classloader updated: Fix test case.

This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch ext-classloader
in repository https://gitbox.apache.org/repos/asf/skywalking-java.git


The following commit(s) were added to refs/heads/ext-classloader by this push:
     new 47c543a  Fix test case.
47c543a is described below

commit 47c543a32953df5470350b8e429c01bc5e6aa829
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Sun Oct 31 15:32:59 2021 +0800

    Fix test case.
---
 docs/en/setup/service-agent/java-agent/README.md       |   3 +++
 .../extclassloader-scenario/config/expectedData.yaml   |  12 ++++++------
 .../extlibs/commons-logging-1.1.3.jar                  | Bin 0 -> 62050 bytes
 .../extclassloader-scenario/extlibs/httpclient-4.3.jar | Bin 0 -> 585465 bytes
 .../extclassloader-scenario/extlibs/httpcore-4.3.jar   | Bin 0 -> 282160 bytes
 test/plugin/scenarios/extclassloader-scenario/pom.xml  |   7 +++----
 .../extclassloader-scenario/support-version.list       |   2 +-
 7 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/docs/en/setup/service-agent/java-agent/README.md b/docs/en/setup/service-agent/java-agent/README.md
index 65ebcbb..4ff90da 100755
--- a/docs/en/setup/service-agent/java-agent/README.md
+++ b/docs/en/setup/service-agent/java-agent/README.md
@@ -76,3 +76,6 @@ active it.
 
 - All plugins in `/plugins` folder are active. Remove the plugin jar, it disabled.
 - The default logging output folder is `/logs`.
+
+If you are using `Extension ClassLoader` for Java services, please refer
+to [Extension ClassLoader Setup](Extension-classloader.md) doc for more details.
diff --git a/test/plugin/scenarios/extclassloader-scenario/config/expectedData.yaml b/test/plugin/scenarios/extclassloader-scenario/config/expectedData.yaml
index 5d979ed..0dabbd2 100644
--- a/test/plugin/scenarios/extclassloader-scenario/config/expectedData.yaml
+++ b/test/plugin/scenarios/extclassloader-scenario/config/expectedData.yaml
@@ -15,11 +15,11 @@
 # limitations under the License.
 segmentItems:
 - serviceName: extclassloader-scenario
-  segmentSize: gt 2
+  segmentSize: gt 0
   segments:
   - segmentId: not null
     spans:
-    - operationName: /extclassloader-scenario/case/receiveContext-0
+    - operationName: GET:/extclassloader-scenario/case/receiveContext-0
       parentSpanId: -1
       spanId: 0
       spanLayer: Http
@@ -33,7 +33,7 @@ segmentItems:
       - {key: url, value: 'http://localhost:8080/extclassloader-scenario/case/receiveContext-0'}
       - {key: http.method, value: GET}
       refs:
-      - {parentEndpoint: /extclassloader-scenario/case/extclassloader-scenario, networkAddress: 'localhost:8080',
+      - {parentEndpoint: GET:/extclassloader-scenario/case/extclassloader-scenario, networkAddress: 'localhost:8080',
         refType: CrossProcess, parentSpanId: 1, parentTraceSegmentId: not null, parentServiceInstance: not
           null, parentService: extclassloader-scenario, traceId: not null}
       skipAnalysis: 'false'
@@ -45,15 +45,15 @@ segmentItems:
       spanLayer: Http
       startTime: nq 0
       endTime: nq 0
-      componentId: 66
+      componentId: 2
       isError: false
       spanType: Exit
       peer: localhost:8080
       tags:
-      - {key: http.method, value: GET}
       - {key: url, value: 'http://localhost:8080/extclassloader-scenario/case/receiveContext-0'}
+      - {key: http.method, value: GET}
       skipAnalysis: 'false'
-    - operationName: /extclassloader-scenario/case/extclassloader-scenario
+    - operationName: GET:/extclassloader-scenario/case/extclassloader-scenario
       parentSpanId: -1
       spanId: 0
       spanLayer: Http
diff --git a/test/plugin/scenarios/extclassloader-scenario/extlibs/commons-logging-1.1.3.jar b/test/plugin/scenarios/extclassloader-scenario/extlibs/commons-logging-1.1.3.jar
new file mode 100644
index 0000000..ab51254
Binary files /dev/null and b/test/plugin/scenarios/extclassloader-scenario/extlibs/commons-logging-1.1.3.jar differ
diff --git a/test/plugin/scenarios/extclassloader-scenario/extlibs/httpclient-4.3.jar b/test/plugin/scenarios/extclassloader-scenario/extlibs/httpclient-4.3.jar
new file mode 100644
index 0000000..62d1e3b
Binary files /dev/null and b/test/plugin/scenarios/extclassloader-scenario/extlibs/httpclient-4.3.jar differ
diff --git a/test/plugin/scenarios/extclassloader-scenario/extlibs/httpcore-4.3.jar b/test/plugin/scenarios/extclassloader-scenario/extlibs/httpcore-4.3.jar
new file mode 100644
index 0000000..ddfe6da
Binary files /dev/null and b/test/plugin/scenarios/extclassloader-scenario/extlibs/httpcore-4.3.jar differ
diff --git a/test/plugin/scenarios/extclassloader-scenario/pom.xml b/test/plugin/scenarios/extclassloader-scenario/pom.xml
index 6883053..f02a0b7 100644
--- a/test/plugin/scenarios/extclassloader-scenario/pom.xml
+++ b/test/plugin/scenarios/extclassloader-scenario/pom.xml
@@ -31,7 +31,6 @@
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <compiler.version>1.8</compiler.version>
         <spring-boot-version>2.1.6.RELEASE</spring-boot-version>
-        <test.framework.version>4.3</test.framework.version>
         <commons.logging.version>1.1.3</commons.logging.version>
     </properties>
 
@@ -68,7 +67,7 @@
         <dependency>
             <groupId>org.apache.httpcomponents</groupId>
             <artifactId>httpclient</artifactId>
-            <version>${test.framework.version}</version>
+            <version>4.3</version>
         </dependency>
     </dependencies>
 
@@ -129,12 +128,12 @@
                                 <artifactItem>
                                     <groupId>org.apache.httpcomponents</groupId>
                                     <artifactId>httpclient</artifactId>
-                                    <version>${test.framework.version}</version>
+                                    <version>4.3</version>
                                 </artifactItem>
                                 <artifactItem>
                                     <groupId>org.apache.httpcomponents</groupId>
                                     <artifactId>httpcore</artifactId>
-                                    <version>${test.framework.version}</version>
+                                    <version>4.3</version>
                                 </artifactItem>
                                 <artifactItem>
                                     <groupId>commons-logging</groupId>
diff --git a/test/plugin/scenarios/extclassloader-scenario/support-version.list b/test/plugin/scenarios/extclassloader-scenario/support-version.list
index 66d5e15..5bb7a37 100644
--- a/test/plugin/scenarios/extclassloader-scenario/support-version.list
+++ b/test/plugin/scenarios/extclassloader-scenario/support-version.list
@@ -14,4 +14,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-4.3
+All