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

zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new b7551d93b8e add show process list it (#21136)
b7551d93b8e is described below

commit b7551d93b8e8e56ca94f6b37a41736f1ad838725
Author: Chuxin Chen <[email protected]>
AuthorDate: Thu Sep 22 18:46:07 2022 +0800

    add show process list it (#21136)
    
    * add show process list it
---
 .../pom.xml                                        |  85 +++++++++++++++
 .../ClusterShowProcessListContainerComposer.java   | 108 +++++++++++++++++++
 .../showprocesslist/engine/ShowProcessListIT.java  | 119 +++++++++++++++++++++
 .../env/IntegrationTestEnvironment.java            |  79 ++++++++++++++
 .../showprocesslist/env/enums/ITEnvTypeEnum.java   |  23 ++++
 .../parameter/ShowProcessListParameterized.java    |  33 ++++++
 .../env/common/cluster/proxy/conf/logback.xml      |  33 ++++++
 .../env/common/cluster/proxy/conf/server.yaml      |  44 ++++++++
 .../env/common/standalone/proxy/conf/logback.xml   |  33 ++++++
 .../env/common/standalone/proxy/conf/server.yaml   |  31 ++++++
 .../src/test/resources/env/it-env.properties       |  21 ++++
 .../src/test/resources/env/mysql/my.cnf            |  29 +++++
 .../env/scenario/cluster_jdbc_proxy/authority.xml  |  69 ++++++++++++
 .../cluster_jdbc_proxy/data/actual/databases.xml   |  21 ++++
 .../cluster_jdbc_proxy/data/actual/dataset.xml     |  19 ++++
 .../data/actual/init-sql/h2/01-actual-init.sql     |  16 +++
 .../data/actual/init-sql/mysql/01-actual-init.sql  |  22 ++++
 .../cluster_jdbc_proxy/data/expected/databases.xml |  21 ++++
 .../cluster_jdbc_proxy/data/expected/dataset.xml   |  19 ++++
 .../data/expected/init-sql/h2/01-expected-init.sql |  16 +++
 .../data/expected/init-sql/mysql/expected-init.sql |  23 ++++
 .../conf/mysql/config-cluster-jdbc-proxy.yaml      |  29 +++++
 .../env/scenario/cluster_jdbc_proxy/rules.yaml     |  18 ++++
 .../src/test/resources/logback-test.xml            |  33 ++++++
 24 files changed, 944 insertions(+)

diff --git 
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/pom.xml
 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/pom.xml
new file mode 100644
index 00000000000..4922c6b0122
--- /dev/null
+++ 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/pom.xml
@@ -0,0 +1,85 @@
+<?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>
+    <parent>
+        <groupId>org.apache.shardingsphere</groupId>
+        <artifactId>shardingsphere-integration-test</artifactId>
+        <version>5.2.1-SNAPSHOT</version>
+    </parent>
+    <artifactId>shardingsphere-integration-test-showprocesslist</artifactId>
+    <name>${project.artifactId}</name>
+    
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-integration-test-env</artifactId>
+            <version>${project.version}</version>
+            <type>test-jar</type>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-integration-test-fixture</artifactId>
+            <version>${project.version}</version>
+            <type>test-jar</type>
+        </dependency>
+        
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+        </dependency>
+        
+        <dependency>
+            <groupId>com.zaxxer</groupId>
+            <artifactId>HikariCP</artifactId>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.testcontainers</groupId>
+            <artifactId>testcontainers</artifactId>
+        </dependency>
+    </dependencies>
+    
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy-resources</id>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <phase>validate</phase>
+                        <configuration>
+                            
<outputDirectory>target/test-classes</outputDirectory>
+                            <resources>
+                                <resource>
+                                    <directory>src/test/resources</directory>
+                                    <filtering>true</filtering>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git 
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/java/org/apache/shardingsphere/test/integration/showprocesslist/container/composer/ClusterShowProcessListContainerComposer.java
 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/java/org/apache/shardingsphere/test/integration/showprocesslist/container/composer/ClusterShowProcessListContainerComposer.java
new file mode 100644
index 00000000000..4bfb50916af
--- /dev/null
+++ 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/java/org/apache/shardingsphere/test/integration/showprocesslist/container/composer/ClusterShowProcessListContainerComposer.java
@@ -0,0 +1,108 @@
+/*
+ * 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.shardingsphere.test.integration.showprocesslist.container.composer;
+
+import org.apache.shardingsphere.infra.database.type.DatabaseType;
+import 
org.apache.shardingsphere.test.integration.env.container.atomic.DockerITContainer;
+import 
org.apache.shardingsphere.test.integration.env.container.atomic.ITContainers;
+import 
org.apache.shardingsphere.test.integration.env.container.atomic.adapter.AdapterContainer;
+import 
org.apache.shardingsphere.test.integration.env.container.atomic.adapter.AdapterContainerFactory;
+import 
org.apache.shardingsphere.test.integration.env.container.atomic.adapter.config.AdaptorContainerConfiguration;
+import 
org.apache.shardingsphere.test.integration.env.container.atomic.governance.GovernanceContainer;
+import 
org.apache.shardingsphere.test.integration.env.container.atomic.governance.GovernanceContainerFactory;
+import 
org.apache.shardingsphere.test.integration.env.container.atomic.storage.StorageContainer;
+import 
org.apache.shardingsphere.test.integration.env.container.atomic.storage.StorageContainerFactory;
+import 
org.apache.shardingsphere.test.integration.env.container.atomic.storage.config.impl.StorageContainerConfigurationFactory;
+import 
org.apache.shardingsphere.test.integration.env.container.atomic.util.AdapterContainerUtil;
+import 
org.apache.shardingsphere.test.integration.showprocesslist.parameter.ShowProcessListParameterized;
+
+import javax.sql.DataSource;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Cluster show process list composed container.
+ */
+public final class ClusterShowProcessListContainerComposer {
+    
+    private final ITContainers containers;
+    
+    private final GovernanceContainer governanceContainer;
+    
+    private final AdapterContainer jdbcContainer;
+    
+    private final AdapterContainer proxyContainer;
+    
+    public ClusterShowProcessListContainerComposer(final 
ShowProcessListParameterized parameterized) {
+        containers = new ITContainers(parameterized.getScenario());
+        governanceContainer = 
containers.registerContainer(GovernanceContainerFactory.newInstance("ZooKeeper"));
+        StorageContainer storageContainer = 
containers.registerContainer(StorageContainerFactory.newInstance(parameterized.getDatabaseType(),
 "", parameterized.getScenario(),
+                
StorageContainerConfigurationFactory.newInstance(parameterized.getDatabaseType())));
+        AdaptorContainerConfiguration containerConfig = new 
AdaptorContainerConfiguration(parameterized.getScenario(),
+                getMountedResources(parameterized.getScenario(), 
parameterized.getDatabaseType()), 
AdapterContainerUtil.getAdapterContainerImage());
+        jdbcContainer = AdapterContainerFactory.newInstance(
+                "cluster", "jdbc", parameterized.getDatabaseType(), 
storageContainer, parameterized.getScenario(), containerConfig);
+        proxyContainer = AdapterContainerFactory.newInstance(
+                "cluster", "proxy", parameterized.getDatabaseType(), 
storageContainer, parameterized.getScenario(), containerConfig);
+        if (proxyContainer instanceof DockerITContainer) {
+            ((DockerITContainer) 
proxyContainer).dependsOn(governanceContainer, storageContainer);
+        }
+        containers.registerContainer(proxyContainer);
+        containers.registerContainer(jdbcContainer);
+    }
+    
+    private Map<String, String> getMountedResources(final String scenario, 
final DatabaseType databaseType) {
+        Map<String, String> result = new HashMap<>(2, 1);
+        String pathInContainer = "/opt/shardingsphere-proxy/conf";
+        result.put("/env/common/cluster/proxy/conf/", pathInContainer);
+        result.put("/env/scenario/" + scenario + "/proxy/conf/" + 
databaseType.getType().toLowerCase(), pathInContainer);
+        return result;
+    }
+    
+    /**
+     * Get jdbc data source.
+     *
+     * @return data source
+     */
+    public DataSource getJdbcDataSource() {
+        return 
jdbcContainer.getTargetDataSource(governanceContainer.getServerLists());
+    }
+    
+    /**
+     * Get proxy data source.
+     *
+     * @return data source
+     */
+    public DataSource getProxyDataSource() {
+        return 
proxyContainer.getTargetDataSource(governanceContainer.getServerLists());
+    }
+    
+    /**
+     * Start.
+     */
+    public void start() {
+        containers.start();
+    }
+    
+    /**
+     * Stop.
+     */
+    public void stop() {
+        containers.stop();
+    }
+}
diff --git 
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/java/org/apache/shardingsphere/test/integration/showprocesslist/engine/ShowProcessListIT.java
 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/java/org/apache/shardingsphere/test/integration/showprocesslist/engine/ShowProcessListIT.java
new file mode 100644
index 00000000000..c1aebe4f143
--- /dev/null
+++ 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/java/org/apache/shardingsphere/test/integration/showprocesslist/engine/ShowProcessListIT.java
@@ -0,0 +1,119 @@
+/*
+ * 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.shardingsphere.test.integration.showprocesslist.engine;
+
+import org.apache.shardingsphere.infra.database.type.dialect.MySQLDatabaseType;
+import 
org.apache.shardingsphere.test.integration.showprocesslist.container.composer.ClusterShowProcessListContainerComposer;
+import 
org.apache.shardingsphere.test.integration.showprocesslist.env.IntegrationTestEnvironment;
+import 
org.apache.shardingsphere.test.integration.showprocesslist.env.enums.ITEnvTypeEnum;
+import 
org.apache.shardingsphere.test.integration.showprocesslist.parameter.ShowProcessListParameterized;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.concurrent.CompletableFuture;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.assertTrue;
+
+// TODO add workflow, add jdbc
+@RunWith(Parameterized.class)
+public final class ShowProcessListIT {
+    
+    private static final IntegrationTestEnvironment ENV = 
IntegrationTestEnvironment.getInstance();
+    
+    private final ClusterShowProcessListContainerComposer containerComposer;
+    
+    public ShowProcessListIT(final ShowProcessListParameterized parameterized) 
{
+        containerComposer = new 
ClusterShowProcessListContainerComposer(parameterized);
+    }
+    
+    @Parameters(name = "{0}")
+    public static Collection<ShowProcessListParameterized> getParameters() {
+        Collection<ShowProcessListParameterized> result = new LinkedList<>();
+        ENV.getScenarios().forEach(each -> {
+            if (ITEnvTypeEnum.DOCKER == ENV.getItEnvType()) {
+                result.add(new ShowProcessListParameterized(new 
MySQLDatabaseType(), each));
+            }
+        });
+        return result;
+    }
+    
+    @Before
+    public void setUp() {
+        containerComposer.start();
+    }
+    
+    @After
+    public void closeContainers() {
+        containerComposer.stop();
+    }
+    
+    @Test
+    public void assertShowProcessList() throws SQLException, 
InterruptedException {
+        CompletableFuture<Void> executeSelectSleep1 = 
CompletableFuture.runAsync(getExecuteSleepThread("proxy"));
+        CompletableFuture<Void> executeSelectSleep2 = 
CompletableFuture.runAsync(getExecuteSleepThread("proxy"));
+        CompletableFuture<Void> executeSelectSleep3 = 
CompletableFuture.runAsync(getExecuteSleepThread("proxy"));
+        Thread.sleep(100);
+        try (Connection connection = 
containerComposer.getProxyDataSource().getConnection();
+             Statement statement = connection.createStatement()
+        ) {
+            ResultSet resultSet = statement.executeQuery("show processlist");
+            assertResultSet(resultSet);
+        }
+        CompletableFuture.allOf(executeSelectSleep1, executeSelectSleep2, 
executeSelectSleep3).join();
+    }
+    
+    private void assertResultSet(final ResultSet resultSet) throws 
SQLException {
+        assertMetaData(resultSet.getMetaData());
+        assertRows(resultSet);
+    }
+    
+    private void assertMetaData(final ResultSetMetaData metaData) throws 
SQLException {
+        assertThat(metaData.getColumnCount(), is(8));
+    }
+    
+    private void assertRows(final ResultSet resultSet) throws SQLException {
+        assertTrue(resultSet.next());
+        assertTrue(resultSet.next());
+        assertTrue(resultSet.next());
+    }
+    
+    private Runnable getExecuteSleepThread(String targetContainer) {
+        return () -> {
+            try (Connection connection = "proxy".equals(targetContainer) ? 
containerComposer.getProxyDataSource().getConnection() : 
containerComposer.getJdbcDataSource().getConnection();
+                 Statement statement = connection.createStatement()
+            ) {
+                statement.executeQuery("select sleep(10)");
+            } catch (SQLException ex) {
+                throw new RuntimeException(ex);
+            }
+        };
+    }
+}
diff --git 
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/java/org/apache/shardingsphere/test/integration/showprocesslist/env/IntegrationTestEnvironment.java
 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/java/org/apache/shardingsphere/test/integration/showprocesslist/env/IntegrationTestEnvironment.java
new file mode 100644
index 00000000000..9ec60d85e92
--- /dev/null
+++ 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/java/org/apache/shardingsphere/test/integration/showprocesslist/env/IntegrationTestEnvironment.java
@@ -0,0 +1,79 @@
+/*
+ * 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.shardingsphere.test.integration.showprocesslist.env;
+
+import com.google.common.base.Splitter;
+import lombok.Getter;
+import lombok.SneakyThrows;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import 
org.apache.shardingsphere.test.integration.env.runtime.scenario.path.ScenarioCommonPath;
+import 
org.apache.shardingsphere.test.integration.showprocesslist.env.enums.ITEnvTypeEnum;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Collection;
+import java.util.Properties;
+
+@Getter
+@Slf4j
+public final class IntegrationTestEnvironment {
+    
+    private static final IntegrationTestEnvironment INSTANCE = new 
IntegrationTestEnvironment();
+    
+    private final Properties props;
+    
+    private final ITEnvTypeEnum itEnvType;
+    
+    private final Collection<String> scenarios;
+    
+    private IntegrationTestEnvironment() {
+        props = loadProperties();
+        itEnvType = 
ITEnvTypeEnum.valueOf(StringUtils.defaultIfBlank(props.getProperty("it.env.type").toUpperCase(),
 ITEnvTypeEnum.NONE.name()));
+        scenarios = getScenarios(props);
+    }
+    
+    /**
+     * Get instance.
+     *
+     * @return singleton instance
+     */
+    public static IntegrationTestEnvironment getInstance() {
+        return INSTANCE;
+    }
+    
+    @SneakyThrows(IOException.class)
+    private Properties loadProperties() {
+        Properties result = new Properties();
+        try (InputStream inputStream = 
IntegrationTestEnvironment.class.getClassLoader().getResourceAsStream("env/it-env.properties"))
 {
+            result.load(inputStream);
+        }
+        for (String each : System.getProperties().stringPropertyNames()) {
+            result.setProperty(each, System.getProperty(each));
+        }
+        return result;
+    }
+    
+    private Collection<String> getScenarios(final Properties props) {
+        Collection<String> result = 
Splitter.on(",").trimResults().splitToList(props.getProperty("it.scenarios"));
+        for (String each : result) {
+            new ScenarioCommonPath(each).checkFolderExist();
+        }
+        return result;
+    }
+}
diff --git 
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/java/org/apache/shardingsphere/test/integration/showprocesslist/env/enums/ITEnvTypeEnum.java
 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/java/org/apache/shardingsphere/test/integration/showprocesslist/env/enums/ITEnvTypeEnum.java
new file mode 100644
index 00000000000..61ea2b22bfc
--- /dev/null
+++ 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/java/org/apache/shardingsphere/test/integration/showprocesslist/env/enums/ITEnvTypeEnum.java
@@ -0,0 +1,23 @@
+/*
+ * 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.shardingsphere.test.integration.showprocesslist.env.enums;
+
+public enum ITEnvTypeEnum {
+    
+    NONE, DOCKER
+}
diff --git 
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/java/org/apache/shardingsphere/test/integration/showprocesslist/parameter/ShowProcessListParameterized.java
 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/java/org/apache/shardingsphere/test/integration/showprocesslist/parameter/ShowProcessListParameterized.java
new file mode 100644
index 00000000000..bb39ecb04aa
--- /dev/null
+++ 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/java/org/apache/shardingsphere/test/integration/showprocesslist/parameter/ShowProcessListParameterized.java
@@ -0,0 +1,33 @@
+/*
+ * 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.shardingsphere.test.integration.showprocesslist.parameter;
+
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
+import lombok.ToString;
+import org.apache.shardingsphere.infra.database.type.DatabaseType;
+
+@Getter
+@RequiredArgsConstructor
+@ToString
+public final class ShowProcessListParameterized {
+    
+    private final DatabaseType databaseType;
+    
+    private final String scenario;
+}
diff --git 
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/common/cluster/proxy/conf/logback.xml
 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/common/cluster/proxy/conf/logback.xml
new file mode 100644
index 00000000000..1494746120c
--- /dev/null
+++ 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/common/cluster/proxy/conf/logback.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!--
+  ~ 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>
+    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] 
%logger{36} - %msg%n</pattern>
+        </encoder>
+    </appender>
+    <logger name="org.apache.shardingsphere" level="info" additivity="false">
+        <appender-ref ref="console" />
+    </logger>
+    
+    <root>
+        <level value="info" />
+        <appender-ref ref="console" />
+    </root>
+</configuration> 
diff --git 
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/common/cluster/proxy/conf/server.yaml
 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/common/cluster/proxy/conf/server.yaml
new file mode 100644
index 00000000000..a546a74b179
--- /dev/null
+++ 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/common/cluster/proxy/conf/server.yaml
@@ -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.
+#
+
+mode:
+  type: Cluster
+  repository:
+    type: ZooKeeper
+    props:
+      namespace: it_db
+      server-lists: zk.host:2181
+      timeToLiveSeconds: 60
+      operationTimeoutMilliseconds: 500
+      retryIntervalMilliseconds: 500
+      maxRetries: 3
+  overwrite: false
+
+rules:
+  - !AUTHORITY
+    users:
+      - proxy@:Proxy@123
+    provider:
+      type: ALL_PERMITTED
+
+props:
+  max-connections-size-per-query: 1
+  kernel-executor-size: 16  # Infinite by default.
+  proxy-frontend-flush-threshold: 128  # The default value is 128.
+  proxy-hint-enabled: true
+  sql-show: false
+  sql-federation-type: ADVANCED
diff --git 
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/common/standalone/proxy/conf/logback.xml
 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/common/standalone/proxy/conf/logback.xml
new file mode 100644
index 00000000000..1494746120c
--- /dev/null
+++ 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/common/standalone/proxy/conf/logback.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!--
+  ~ 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>
+    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] 
%logger{36} - %msg%n</pattern>
+        </encoder>
+    </appender>
+    <logger name="org.apache.shardingsphere" level="info" additivity="false">
+        <appender-ref ref="console" />
+    </logger>
+    
+    <root>
+        <level value="info" />
+        <appender-ref ref="console" />
+    </root>
+</configuration> 
diff --git 
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/common/standalone/proxy/conf/server.yaml
 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/common/standalone/proxy/conf/server.yaml
new file mode 100644
index 00000000000..4add9f7f351
--- /dev/null
+++ 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/common/standalone/proxy/conf/server.yaml
@@ -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.
+#
+
+rules:
+  - !AUTHORITY
+    users:
+      - proxy@:Proxy@123
+    provider:
+      type: ALL_PERMITTED
+
+props:
+  max-connections-size-per-query: 1
+  kernel-executor-size: 16  # Infinite by default.
+  proxy-frontend-flush-threshold: 128  # The default value is 128.
+  proxy-hint-enabled: true
+  sql-show: false
+  sql-federation-type: ADVANCED
diff --git 
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/it-env.properties
 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/it-env.properties
new file mode 100644
index 00000000000..68eaca695d7
--- /dev/null
+++ 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/it-env.properties
@@ -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.
+#
+
+# it.env.type=DOCKER
+it.env.type=
+# it.scenarios=cluster_jdbc_proxy
+it.scenarios=cluster_jdbc_proxy
diff --git 
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/mysql/my.cnf
 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/mysql/my.cnf
new file mode 100644
index 00000000000..6d55640b7b2
--- /dev/null
+++ 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/mysql/my.cnf
@@ -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.
+#
+
+[mysql]
+
+[mysqld]
+log-bin=mysql-bin
+binlog-format=row
+binlog-row-image=full
+max_connections=600
+default-authentication-plugin=mysql_native_password
+sql_mode=
+lower_case_table_names=1
+# for mysql 8.0
+secure_file_priv=/var/lib/mysql
diff --git 
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/authority.xml
 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/authority.xml
new file mode 100644
index 00000000000..78a86719405
--- /dev/null
+++ 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/authority.xml
@@ -0,0 +1,69 @@
+<!--
+  ~ 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.
+  -->
+
+<authority>
+    <sqlset db-types="Oracle,SQLServer,PostgreSQL">
+        <user-create>
+            <sql>CREATE USER default_user</sql>
+            <sql>CREATE ROLE default_role</sql>
+            <sql>CREATE ROLE role2</sql>
+            <sql>CREATE ROLE role3</sql>
+            <sql>CREATE ROLE role4</sql>
+        </user-create>
+        <user-drop>
+            <sql>DROP ROLE IF EXISTS default_role</sql>
+            <sql>DROP ROLE IF EXISTS role_dev</sql>
+            <sql>DROP ROLE IF EXISTS role_dev_new</sql>
+            <sql>DROP ROLE IF EXISTS role2</sql>
+            <sql>DROP ROLE IF EXISTS role3</sql>
+            <sql>DROP ROLE IF EXISTS role4</sql>
+            <sql>DROP USER IF EXISTS user_dev</sql>
+            <sql>DROP USER IF EXISTS user_dev_new</sql>
+            <sql>DROP USER IF EXISTS default_user</sql>
+        </user-drop>
+    </sqlset>
+    <sqlset db-types="SQLServer">
+        <user-create>
+            <sql>CREATE LOGIN login_dev</sql>
+            <sql>CREATE USER user_dev FOR LOGIN login_dev</sql>
+        </user-create>
+        <user-drop>
+            <sql>DROP LOGIN IF EXISTS login_dev</sql>
+            <sql>DROP LOGIN IF EXISTS login_dev_new</sql>
+        </user-drop>
+    </sqlset>
+    <sqlset db-types="MySQL">
+        <user-create>
+            <sql>CREATE ROLE default_role</sql>
+            <sql>CREATE USER user_dev@localhost</sql>
+        </user-create>
+        <user-drop>
+            <sql>DROP USER IF EXISTS user_dev@localhost</sql>
+            <sql>DROP USER IF EXISTS user_dev_new@localhost</sql>
+            <sql>DROP USER IF EXISTS [email protected]</sql>
+            <sql>DROP ROLE IF EXISTS default_role</sql>
+            <sql>DROP ROLE IF EXISTS role_dev</sql>
+            <sql>DROP ROLE IF EXISTS role_dev_new</sql>
+            <sql>FLUSH PRIVILEGES</sql>
+        </user-drop>
+    </sqlset>
+    <sqlset db-types="Oracle">
+        <user-create>
+            <sql>CREATE USER user_dev identified by passwd_dev</sql>
+        </user-create>
+    </sqlset>
+</authority>
diff --git 
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/data/actual/databases.xml
 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/data/actual/databases.xml
new file mode 100644
index 00000000000..321ce10618a
--- /dev/null
+++ 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/data/actual/databases.xml
@@ -0,0 +1,21 @@
+<?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.
+  -->
+
+<databases>
+    <database>db</database>
+</databases>
diff --git 
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/data/actual/dataset.xml
 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/data/actual/dataset.xml
new file mode 100644
index 00000000000..840ad09871f
--- /dev/null
+++ 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/data/actual/dataset.xml
@@ -0,0 +1,19 @@
+<!--
+  ~ 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.
+  -->
+
+<dataset>
+</dataset>
diff --git 
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/data/actual/init-sql/h2/01-actual-init.sql
 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/data/actual/init-sql/h2/01-actual-init.sql
new file mode 100644
index 00000000000..e3b8a181bea
--- /dev/null
+++ 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/data/actual/init-sql/h2/01-actual-init.sql
@@ -0,0 +1,16 @@
+--
+-- 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.
+--
diff --git 
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/data/actual/init-sql/mysql/01-actual-init.sql
 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/data/actual/init-sql/mysql/01-actual-init.sql
new file mode 100644
index 00000000000..09f76e3f6d1
--- /dev/null
+++ 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/data/actual/init-sql/mysql/01-actual-init.sql
@@ -0,0 +1,22 @@
+--
+-- 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.
+--
+
+SET character_set_database='utf8';
+SET character_set_server='utf8';
+
+DROP DATABASE IF EXISTS db;
+CREATE DATABASE db;
diff --git 
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/data/expected/databases.xml
 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/data/expected/databases.xml
new file mode 100644
index 00000000000..7d313fee9d0
--- /dev/null
+++ 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/data/expected/databases.xml
@@ -0,0 +1,21 @@
+<?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.
+  -->
+
+<databases>
+    <database>dataset</database>
+</databases>
diff --git 
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/data/expected/dataset.xml
 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/data/expected/dataset.xml
new file mode 100644
index 00000000000..840ad09871f
--- /dev/null
+++ 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/data/expected/dataset.xml
@@ -0,0 +1,19 @@
+<!--
+  ~ 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.
+  -->
+
+<dataset>
+</dataset>
diff --git 
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/data/expected/init-sql/h2/01-expected-init.sql
 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/data/expected/init-sql/h2/01-expected-init.sql
new file mode 100644
index 00000000000..e3b8a181bea
--- /dev/null
+++ 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/data/expected/init-sql/h2/01-expected-init.sql
@@ -0,0 +1,16 @@
+--
+-- 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.
+--
diff --git 
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/data/expected/init-sql/mysql/expected-init.sql
 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/data/expected/init-sql/mysql/expected-init.sql
new file mode 100644
index 00000000000..fd9b8a59246
--- /dev/null
+++ 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/data/expected/init-sql/mysql/expected-init.sql
@@ -0,0 +1,23 @@
+--
+-- 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.
+--
+
+SET character_set_database='utf8';
+SET character_set_server='utf8';
+
+
+DROP DATABASE IF EXISTS dataset;
+CREATE DATABASE dataset;
diff --git 
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/proxy/conf/mysql/config-cluster-jdbc-proxy.yaml
 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/proxy/conf/mysql/config-cluster-jdbc-proxy.yaml
new file mode 100644
index 00000000000..35de7738234
--- /dev/null
+++ 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/proxy/conf/mysql/config-cluster-jdbc-proxy.yaml
@@ -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.
+#
+
+databaseName: cluster_jdbc_proxy
+
+dataSources:
+  db:
+    url: 
jdbc:mysql://mysql.cluster_jdbc_proxy.host:3306/db?serverTimezone=UTC&useSSL=false&characterEncoding=utf-8
+    username: test_user
+    password: Test@123
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+    minPoolSize: 50
diff --git 
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/rules.yaml
 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/rules.yaml
new file mode 100644
index 00000000000..c0d9a236b71
--- /dev/null
+++ 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/env/scenario/cluster_jdbc_proxy/rules.yaml
@@ -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.
+#
+
+rules:
diff --git 
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/logback-test.xml
 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/logback-test.xml
new file mode 100644
index 00000000000..c7fbb061cd7
--- /dev/null
+++ 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-showprocesslist/src/test/resources/logback-test.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!--
+  ~ 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>
+    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] 
%logger{36} - %msg%n</pattern>
+        </encoder>
+    </appender>
+    <logger name="org.apache.shardingsphere" level="warn" additivity="true">
+        <appender-ref ref="console" />
+    </logger>
+    <logger name="com.zaxxer.hikari" level="warn" />
+    <root>
+        <level value="info" />
+        <appender-ref ref="console" />
+    </root>
+</configuration> 

Reply via email to