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/12/25 09:25:21 UTC

[skywalking] branch master updated: [test/plugin] immigrate test zookeeper scenario. (#4106)

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 1e9f929  [test/plugin] immigrate test zookeeper scenario.  (#4106)
1e9f929 is described below

commit 1e9f929f978ac7fbad11832176ce7b0190181a92
Author: 于玉桔 <zh...@apache.org>
AuthorDate: Wed Dec 25 17:25:09 2019 +0800

    [test/plugin] immigrate test zookeeper scenario.  (#4106)
    
    * zookeeper test
    
    * update expected data file
    
    * fix review code
    
    * fixed
    
    * bugfix
    
    * update version
    
    * fix bug
    
    * fix
    
    Co-authored-by: zhang-wei <pk...@outlook.com>
    Co-authored-by: 吴晟 Wu Sheng <wu...@foxmail.com>
---
 .github/workflows/plugins-test.yaml                |   4 +-
 .../service-agent/java-agent/Supported-list.md     |   2 +-
 .../scenarios/zookeeper-scenario/bin/startup.sh    |  21 +++
 .../zookeeper-scenario/config/expectedData.yaml    | 133 ++++++++++++++++++
 .../scenarios/zookeeper-scenario/configuration.yml |  31 +++++
 test/plugin/scenarios/zookeeper-scenario/pom.xml   | 148 +++++++++++++++++++++
 .../src/main/assembly/assembly.xml                 |  41 ++++++
 .../apm/testcase/zookeeper/Application.java        |  35 +++++
 .../testcase/zookeeper/controller/Zookeeper.java   |  46 +++++++
 .../zookeeper/controller/ZookeeperController.java  |  64 +++++++++
 .../src/main/resources/application.properties      |  20 +++
 .../src/main/resources/log4j2.xml                  |  30 +++++
 .../zookeeper-scenario/support-version.list        |  30 +++++
 13 files changed, 603 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/plugins-test.yaml b/.github/workflows/plugins-test.yaml
index 0fb8c5d..4b4a433 100644
--- a/.github/workflows/plugins-test.yaml
+++ b/.github/workflows/plugins-test.yaml
@@ -296,7 +296,7 @@ jobs:
       - name: Run mongodb 3.4.0-3.11.1 (17)
         run: bash test/plugin/run.sh mongodb-3.x-scenario
 
-  Redisson_ShardingSphere:
+  Redisson_ShardingSphere_Zookeeper:
     runs-on: ubuntu-18.04
     timeout-minutes: 90
     strategy:
@@ -322,6 +322,8 @@ jobs:
         run: bash test/plugin/run.sh redisson-scenario
       - name: Run shardingsphere-3.x-scenario 3.0.0 (1)
         run: bash test/plugin/run.sh shardingsphere-3.x-scenario
+      - name: Run zookeeper 3.4.x (14)
+        run: bash test/plugin/run.sh zookeeper-scenario
 
   Spring43:
     runs-on: ubuntu-18.04
diff --git a/docs/en/setup/service-agent/java-agent/Supported-list.md b/docs/en/setup/service-agent/java-agent/Supported-list.md
index 92d66c4..8d408c6 100644
--- a/docs/en/setup/service-agent/java-agent/Supported-list.md
+++ b/docs/en/setup/service-agent/java-agent/Supported-list.md
@@ -67,7 +67,7 @@
 * Service Discovery
   * [Netflix Eureka](https://github.com/Netflix/eureka)
 * Distributed Coordination
-  * [Zookeeper](https://github.com/apache/zookeeper) 3.4.0+ (Optional² & Except 3.4.4)
+  * [Zookeeper](https://github.com/apache/zookeeper) 3.4.x (Optional² & Except 3.4.4)
 * Spring Ecosystem
   * Spring Bean annotations(@Bean, @Service, @Component, @Repository) 3.x and 4.x (Optional²)
   * Spring Core Async SuccessCallback/FailureCallback/ListenableFutureCallback 4.x
diff --git a/test/plugin/scenarios/zookeeper-scenario/bin/startup.sh b/test/plugin/scenarios/zookeeper-scenario/bin/startup.sh
new file mode 100644
index 0000000..30c9f35
--- /dev/null
+++ b/test/plugin/scenarios/zookeeper-scenario/bin/startup.sh
@@ -0,0 +1,21 @@
+#!/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 -Dzookeeper.host=${ZK_ADDRESS} -jar ${agent_opts} ${home}/../libs/zookeeper-scenario.jar &
\ No newline at end of file
diff --git a/test/plugin/scenarios/zookeeper-scenario/config/expectedData.yaml b/test/plugin/scenarios/zookeeper-scenario/config/expectedData.yaml
new file mode 100644
index 0000000..6fb9f37
--- /dev/null
+++ b/test/plugin/scenarios/zookeeper-scenario/config/expectedData.yaml
@@ -0,0 +1,133 @@
+# 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:
+    - {zookeeper-scenario: 2}
+  instances:
+    - {zookeeper-scenario: 1}
+  operationNames:
+    - zookeeper-scenario: [Zookeeper/WatchedEvent/NodeDeleted, /zookeeper-scenario/case/zookeeper-case,
+                           /zookeeper-scenario/case/healthCheck]
+  heartbeat: []
+segmentItems:
+  - applicationCode: zookeeper-scenario
+    segmentSize: nq 0
+    segments:
+      - segmentId: not null
+        spans:
+          - operationName: Zookeeper/exists
+            operationId: 0
+            parentSpanId: 0
+            spanId: 1
+            spanLayer: Cache
+            startTime: not null
+            endTime: not null
+            componentId: 58
+            componentName: ''
+            isError: false
+            spanType: Exit
+            peer: not null
+            peerId: 0
+            tags:
+              - {key: db.type, value: Zookeeper}
+              - {key: path, value: /path}
+              - {key: watch, value: 'true'}
+          - operationName: Zookeeper/WatchedEvent/NodeDeleted
+            operationId: 0
+            parentSpanId: -1
+            spanId: 0
+            spanLayer: Unknown
+            startTime: not null
+            endTime: not null
+            componentId: 58
+            componentName: ''
+            isError: false
+            spanType: Entry
+            peer: ''
+            peerId: 0
+            tags:
+              - {key: path, value: /path}
+              - {key: state, value: SyncConnected}
+              - {key: db.type, value: Zookeeper}
+      - segmentId: not null
+        spans:
+          - operationName: Zookeeper/create
+            operationId: 0
+            parentSpanId: 0
+            spanId: 1
+            spanLayer: Cache
+            startTime: not null
+            endTime: not null
+            componentId: 58
+            componentName: ''
+            isError: false
+            spanType: Exit
+            peer: not null
+            peerId: 0
+            tags:
+              - {key: db.type, value: Zookeeper}
+              - {key: path, value: /path}
+          - operationName: Zookeeper/exists
+            operationId: 0
+            parentSpanId: 0
+            spanId: 2
+            spanLayer: Cache
+            startTime: not null
+            endTime: not null
+            componentId: 58
+            componentName: ''
+            isError: false
+            spanType: Exit
+            peer: not null
+            peerId: 0
+            tags:
+              - {key: db.type, value: Zookeeper}
+              - {key: path, value: /path}
+              - {key: watch, value: 'true'}
+          - operationName: Zookeeper/delete
+            operationId: 0
+            parentSpanId: 0
+            spanId: 3
+            spanLayer: Cache
+            startTime: not null
+            endTime: not null
+            componentId: 58
+            componentName: ''
+            isError: false
+            spanType: Exit
+            peer: not null
+            peerId: 0
+            tags:
+              - {key: db.type, value: Zookeeper}
+              - {key: path, value: /path}
+              - {key: version, value: '-1'}
+          - operationName: /zookeeper-scenario/case/zookeeper-case
+            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/zookeeper-scenario/configuration.yml b/test/plugin/scenarios/zookeeper-scenario/configuration.yml
new file mode 100644
index 0000000..53aca62
--- /dev/null
+++ b/test/plugin/scenarios/zookeeper-scenario/configuration.yml
@@ -0,0 +1,31 @@
+# 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/zookeeper-scenario/case/zookeeper-case
+healthCheck: http://localhost:8080/zookeeper-scenario/case/healthCheck
+startScript: ./bin/startup.sh
+framework: zookeeper
+runningMode: with_optional
+withPlugins: apm-zookeeper-3.4.x-plugin-*.jar
+environment:
+  - ZK_ADDRESS=zk-server:2181
+depends_on:
+  - zk-server
+dependencies:
+  zk-server:
+    image: zookeeper:3.4.10
+    hostname: zk-server
\ No newline at end of file
diff --git a/test/plugin/scenarios/zookeeper-scenario/pom.xml b/test/plugin/scenarios/zookeeper-scenario/pom.xml
new file mode 100644
index 0000000..4cbbf00
--- /dev/null
+++ b/test/plugin/scenarios/zookeeper-scenario/pom.xml
@@ -0,0 +1,148 @@
+<?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>zookeeper-scenario</artifactId>
+    <version>5.0.0</version>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <compiler.version>1.8</compiler.version>
+        <test.framework.version>3.4.13</test.framework.version>
+        <docker.image.version>${test.framework.version}</docker.image.version>
+        <log4j.version>2.6.2</log4j.version>
+        <spring.version>4.3.8.RELEASE</spring.version>
+        <spring-boot-version>1.5.2.RELEASE</spring-boot-version>
+    </properties>
+
+    <name>skywalking-zookeeper-scenario</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.zookeeper</groupId>
+            <artifactId>zookeeper</artifactId>
+            <version>${test.framework.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>log4j</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <!-- Spring Boot-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter</artifactId>
+            <version>${spring-boot-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-api</artifactId>
+            <version>${log4j.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-core</artifactId>
+            <version>${log4j.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-slf4j-impl</artifactId>
+            <version>${log4j.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-jcl</artifactId>
+            <version>${log4j.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-tomcat</artifactId>
+            <version>${spring-boot-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+            <version>${spring-boot-version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>zookeeper-scenario</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>${compiler.version}</source>
+                    <target>${compiler.version}</target>
+                    <encoding>${project.build.sourceEncoding}</encoding>
+                </configuration>
+            </plugin>
+            <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>
+
+    <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/zookeeper-scenario/src/main/assembly/assembly.xml b/test/plugin/scenarios/zookeeper-scenario/src/main/assembly/assembly.xml
new file mode 100644
index 0000000..efdd1b9
--- /dev/null
+++ b/test/plugin/scenarios/zookeeper-scenario/src/main/assembly/assembly.xml
@@ -0,0 +1,41 @@
+<?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>${project.build.directory}/zookeeper-scenario.jar</source>
+            <outputDirectory>./libs</outputDirectory>
+            <fileMode>0775</fileMode>
+        </file>
+    </files>
+</assembly>
diff --git a/test/plugin/scenarios/zookeeper-scenario/src/main/java/org/apache/skywalking/apm/testcase/zookeeper/Application.java b/test/plugin/scenarios/zookeeper-scenario/src/main/java/org/apache/skywalking/apm/testcase/zookeeper/Application.java
new file mode 100644
index 0000000..3c23131
--- /dev/null
+++ b/test/plugin/scenarios/zookeeper-scenario/src/main/java/org/apache/skywalking/apm/testcase/zookeeper/Application.java
@@ -0,0 +1,35 @@
+/*
+ * 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.zookeeper;
+
+import org.springframework.boot.SpringApplication;
+
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class Application {
+
+    public static void main(String[] args) {
+        try {
+            SpringApplication.run(Application.class, args);
+        } catch (Exception e) {
+            // Never do this
+        }
+    }
+}
diff --git a/test/plugin/scenarios/zookeeper-scenario/src/main/java/org/apache/skywalking/apm/testcase/zookeeper/controller/Zookeeper.java b/test/plugin/scenarios/zookeeper-scenario/src/main/java/org/apache/skywalking/apm/testcase/zookeeper/controller/Zookeeper.java
new file mode 100644
index 0000000..23e05ea
--- /dev/null
+++ b/test/plugin/scenarios/zookeeper-scenario/src/main/java/org/apache/skywalking/apm/testcase/zookeeper/controller/Zookeeper.java
@@ -0,0 +1,46 @@
+/*
+ * 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.zookeeper.controller;
+
+import org.apache.zookeeper.ZooKeeper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.PropertySource;
+
+import java.io.IOException;
+
+
+@Configuration
+@PropertySource("classpath:application.properties")
+public class Zookeeper {
+
+    private Logger logger = LoggerFactory.getLogger(Zookeeper.class);
+
+    @Value(value = "${zookeeper.host}")
+    private String address;
+
+    @Bean
+    public ZooKeeper zooKeeper() throws IOException {
+        ZooKeeper zooKeeper = new ZooKeeper(address, 8000, event -> logger.info("process"));
+        return zooKeeper;
+    }
+}
diff --git a/test/plugin/scenarios/zookeeper-scenario/src/main/java/org/apache/skywalking/apm/testcase/zookeeper/controller/ZookeeperController.java b/test/plugin/scenarios/zookeeper-scenario/src/main/java/org/apache/skywalking/apm/testcase/zookeeper/controller/ZookeeperController.java
new file mode 100644
index 0000000..c4cf470
--- /dev/null
+++ b/test/plugin/scenarios/zookeeper-scenario/src/main/java/org/apache/skywalking/apm/testcase/zookeeper/controller/ZookeeperController.java
@@ -0,0 +1,64 @@
+/*
+ * 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.zookeeper.controller;
+
+import org.apache.zookeeper.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.PropertySource;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+@Controller
+@RequestMapping("/case")
+@PropertySource("classpath:application.properties")
+public class ZookeeperController {
+    private Logger logger = LoggerFactory.getLogger(ZookeeperController.class);
+
+    @Autowired
+    private ZooKeeper zooKeeper;
+
+    @RequestMapping("/zookeeper-case")
+    @ResponseBody
+    public String zookeeperCase() throws KeeperException, InterruptedException {
+        zooKeeper.create("/path", "data".getBytes(), ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.EPHEMERAL);
+        zooKeeper.exists("/path", watcher);
+        zooKeeper.delete("/path", -1);
+        return "Success";
+    }
+
+    @RequestMapping("/healthCheck")
+    @ResponseBody
+    public String healthCheck() {
+        return "healthCheck";
+    }
+
+    private Watcher watcher = new Watcher() {
+        @Override
+        public void process(WatchedEvent event) {
+            try {
+                zooKeeper.exists("/path", this);
+            } catch (Exception e) {
+                logger.error("error", e);
+            }
+        }
+    };
+}
diff --git a/test/plugin/scenarios/zookeeper-scenario/src/main/resources/application.properties b/test/plugin/scenarios/zookeeper-scenario/src/main/resources/application.properties
new file mode 100644
index 0000000..ef8724c
--- /dev/null
+++ b/test/plugin/scenarios/zookeeper-scenario/src/main/resources/application.properties
@@ -0,0 +1,20 @@
+#
+# 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=8080
+server.contextPath=/zookeeper-scenario
diff --git a/test/plugin/scenarios/zookeeper-scenario/src/main/resources/log4j2.xml b/test/plugin/scenarios/zookeeper-scenario/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..9849ed5
--- /dev/null
+++ b/test/plugin/scenarios/zookeeper-scenario/src/main/resources/log4j2.xml
@@ -0,0 +1,30 @@
+<?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.
+  ~
+  -->
+<Configuration status="WARN">
+    <Appenders>
+        <Console name="Console" target="SYSTEM_ERR">
+            <PatternLayout charset="UTF-8" pattern="[%d{yyyy-MM-dd HH:mm:ss:SSS}] [%p] - %l - %m%n"/>
+        </Console>
+    </Appenders>
+    <Loggers>
+        <Root level="WARN">
+            <AppenderRef ref="Console"/>
+        </Root>
+    </Loggers>
+</Configuration>
\ No newline at end of file
diff --git a/test/plugin/scenarios/zookeeper-scenario/support-version.list b/test/plugin/scenarios/zookeeper-scenario/support-version.list
new file mode 100644
index 0000000..dd9517c
--- /dev/null
+++ b/test/plugin/scenarios/zookeeper-scenario/support-version.list
@@ -0,0 +1,30 @@
+# 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.
+
+3.4.14
+3.4.13
+3.4.12
+3.4.11
+3.4.10
+3.4.9
+3.4.8
+3.4.7
+3.4.6
+3.4.5
+3.4.3
+3.4.2
+3.4.1
+3.4.0
\ No newline at end of file