You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/02/21 17:58:58 UTC

[GitHub] [shardingsphere] dmsolr opened a new pull request #9461: [WIP] Refactor IT Engine

dmsolr opened a new pull request #9461:
URL: https://github.com/apache/shardingsphere/pull/9461


   Fixes #ISSUSE_ID.
   
   This PR will miss some features and test scenarios, such as cases run in parallel, until the progress finish.
   
   Changes proposed in this pull request:
   - 
   -
   -
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] dmsolr commented on a change in pull request #9461: Refactor IT Engine

Posted by GitBox <gi...@apache.org>.
dmsolr commented on a change in pull request #9461:
URL: https://github.com/apache/shardingsphere/pull/9461#discussion_r584476329



##########
File path: shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-fixture/src/test/java/org/apache/shardingsphere/test/integration/junit/container/H2Container.java
##########
@@ -0,0 +1,54 @@
+/*
+ * 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.junit.container;
+
+import org.apache.shardingsphere.infra.database.type.dialect.H2DatabaseType;
+
+import javax.sql.DataSource;
+
+public class H2Container extends StorageContainer {

Review comment:
       We introduce an abstracted storage container to present storage. That is, H2 container is a fake container(need not start a docker container). So that the IT engine can unify manage it.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] dmsolr closed pull request #9461: Refactor IT Engine

Posted by GitBox <gi...@apache.org>.
dmsolr closed pull request #9461:
URL: https://github.com/apache/shardingsphere/pull/9461


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] codecov-io edited a comment on pull request #9461: [WIP] Refactor IT Engine

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #9461:
URL: https://github.com/apache/shardingsphere/pull/9461#issuecomment-785637372


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/9461?src=pr&el=h1) Report
   > Merging [#9461](https://codecov.io/gh/apache/shardingsphere/pull/9461?src=pr&el=desc) (4365c7e) into [master](https://codecov.io/gh/apache/shardingsphere/commit/aa06dc42c2d70e5f1daf0d6a4292d351c16ee7ef?el=desc) (aa06dc4) will **decrease** coverage by `0.08%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/9461/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so)](https://codecov.io/gh/apache/shardingsphere/pull/9461?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #9461      +/-   ##
   ============================================
   - Coverage     68.19%   68.11%   -0.09%     
     Complexity      670      670              
   ============================================
     Files          1660     1660              
     Lines         27414    27414              
     Branches       4827     4827              
   ============================================
   - Hits          18696    18674      -22     
   - Misses         7361     7384      +23     
   + Partials       1357     1356       -1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/9461?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [...sphere/scaling/core/job/schedule/JobScheduler.java](https://codecov.io/gh/apache/shardingsphere/pull/9461/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9qb2Ivc2NoZWR1bGUvSm9iU2NoZWR1bGVyLmphdmE=) | `22.22% <0.00%> (-29.63%)` | `0.00% <0.00%> (ø%)` | |
   | [...re/scaling/core/executor/engine/ExecuteEngine.java](https://codecov.io/gh/apache/shardingsphere/pull/9461/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9leGVjdXRvci9lbmdpbmUvRXhlY3V0ZUVuZ2luZS5qYXZh) | `88.88% <0.00%> (-11.12%)` | `0.00% <0.00%> (ø%)` | |
   | [...scaling/core/job/task/inventory/InventoryTask.java](https://codecov.io/gh/apache/shardingsphere/pull/9461/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9qb2IvdGFzay9pbnZlbnRvcnkvSW52ZW50b3J5VGFzay5qYXZh) | `68.88% <0.00%> (-6.67%)` | `0.00% <0.00%> (ø%)` | |
   | [...ing/core/job/task/incremental/IncrementalTask.java](https://codecov.io/gh/apache/shardingsphere/pull/9461/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9qb2IvdGFzay9pbmNyZW1lbnRhbC9JbmNyZW1lbnRhbFRhc2suamF2YQ==) | `72.91% <0.00%> (-2.09%)` | `0.00% <0.00%> (ø%)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/9461?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/9461?src=pr&el=footer). Last update [aa06dc4...4365c7e](https://codecov.io/gh/apache/shardingsphere/pull/9461?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] terrymanu commented on a change in pull request #9461: Refactor IT Engine

Posted by GitBox <gi...@apache.org>.
terrymanu commented on a change in pull request #9461:
URL: https://github.com/apache/shardingsphere/pull/9461#discussion_r583373177



##########
File path: .github/workflows/it.yml
##########
@@ -25,8 +25,15 @@ on:
 
 jobs:
   mysql-proxy-db:
-    name: MySQL-Proxy with DB
+    name: MySQL with DB

Review comment:
       The name `MySQL` is static, but value of `database` is dynamic.
   Can we consider about name it more generic?

##########
File path: shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-fixture/Dockerfile
##########
@@ -15,13 +15,25 @@
 # limitations under the License.
 #
 
-FROM openjdk:8-jdk-alpine
+FROM openjdk:8

Review comment:
       8-jdk-alpine is thin enough, can we use it?

##########
File path: shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-fixture/src/test/java/org/apache/shardingsphere/test/integration/cases/dataset/DataSetLoader.java
##########
@@ -52,6 +52,7 @@ public static DataSet load(final String parentPath, final String scenario, final
         }
     }
     
+    @SneakyThrows

Review comment:
       Unnecessary change?

##########
File path: shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-fixture/src/test/java/org/apache/shardingsphere/test/integration/cases/dataset/DataSetLoader.java
##########
@@ -65,6 +66,6 @@ private static String getFile(final String parentPath, final String scenario, fi
         if (new File(result).exists()) {
             return result;
         }
-        throw new IllegalArgumentException(String.format("%s not found, path=%s, scenario=%s, databaseType=%s", dataSetFile, parentPath, scenario, databaseType.getName()));
+        throw new IllegalArgumentException(String.format("%s not found, path=%s, scenario=%s, databaseType=%s", dataSetFile, result, scenario, databaseType.getName()));

Review comment:
       Unnecessary change?

##########
File path: .github/workflows/it.yml
##########
@@ -41,216 +48,6 @@ jobs:
         with:
           java-version: 8
       - name: Build Project
-        run: ./mvnw -B clean install -Dmaven.javadoc.skip=true -Drat.skip=true -Djacoco.skip=true -DskipITs -DskipTests
+        run: ./mvnw -B clean install -DskipTests -Dmaven.javadoc.skip=true -Ddockerfile.skip.build=false -Drat.skip=true -Djacoco.skip=true -am -pl shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite
       - name: Run Integration Test
-        run: ./mvnw -B clean install -f shardingsphere-test/shardingsphere-integration-test/pom.xml -Pit.env.docker -Dit.adapters=proxy -Dit.scenarios=db -Dit.databases=MySQL
-  
-  mysql-proxy-tbl:
-    name: MySQL-Proxy with TBL
-    runs-on: ubuntu-latest
-    steps:
-      - name: Cache Maven Repos
-        uses: actions/cache@v2
-        with:
-          path: ~/.m2/repository
-          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
-          restore-keys: |
-            ${{ runner.os }}-maven-
-      - uses: actions/checkout@v2
-      - name: Set up JDK 8
-        uses: actions/setup-java@v1
-        with:
-          java-version: 8
-      - name: Build Project
-        run: ./mvnw -B clean install -Dmaven.javadoc.skip=true -Drat.skip=true -Djacoco.skip=true -DskipITs -DskipTests
-      - name: Run Integration Test
-        run: ./mvnw -B clean install -f shardingsphere-test/shardingsphere-integration-test/pom.xml -Pit.env.docker -Dit.adapters=proxy -Dit.scenarios=tbl -Dit.databases=MySQL
-  
-  mysql-proxy-repilca-query:
-    name: MySQL-Proxy with REPLICA-QUERY
-    runs-on: ubuntu-latest
-    steps:
-      - name: Cache Maven Repos
-        uses: actions/cache@v2
-        with:
-          path: ~/.m2/repository
-          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
-          restore-keys: |
-            ${{ runner.os }}-maven-
-      - uses: actions/checkout@v2
-      - name: Set up JDK 8
-        uses: actions/setup-java@v1
-        with:
-          java-version: 8
-      - name: Build Project
-        run: ./mvnw -B clean install -Dmaven.javadoc.skip=true -Drat.skip=true -Djacoco.skip=true -DskipITs -DskipTests
-      - name: Run Integration Test
-        run: ./mvnw -B clean install -f shardingsphere-test/shardingsphere-integration-test/pom.xml -Pit.env.docker -Dit.adapters=proxy -Dit.scenarios=replica_query -Dit.databases=MySQL
-  
-  mysql-proxy-dbtbl-with-proxy-repilca-query:
-    name: MySQL-Proxy with DBTBL-WITH-REPLICA-QUERY
-    runs-on: ubuntu-latest
-    steps:
-      - name: Cache Maven Repos
-        uses: actions/cache@v2
-        with:
-          path: ~/.m2/repository
-          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
-          restore-keys: |
-            ${{ runner.os }}-maven-
-      - uses: actions/checkout@v2
-      - name: Set up JDK 8
-        uses: actions/setup-java@v1
-        with:
-          java-version: 8
-      - name: Build Project
-        run: ./mvnw -B clean install -Dmaven.javadoc.skip=true -Drat.skip=true -Djacoco.skip=true -DskipITs -DskipTests
-      - name: Run Integration Test
-        run: ./mvnw -B clean install -f shardingsphere-test/shardingsphere-integration-test/pom.xml -Pit.env.docker -Dit.adapters=proxy -Dit.scenarios=dbtbl_with_replica_query -Dit.databases=MySQL
-
-  mysql-proxy-encrypt:
-    name: MySQL-Proxy with ENCRYPT
-    runs-on: ubuntu-latest
-    steps:
-      - name: Cache Maven Repos
-        uses: actions/cache@v2
-        with:
-          path: ~/.m2/repository
-          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
-          restore-keys: |
-            ${{ runner.os }}-maven-
-      - uses: actions/checkout@v2
-      - name: Set up JDK 8
-        uses: actions/setup-java@v1
-        with:
-          java-version: 8
-      - name: Build Project
-        run: ./mvnw -B clean install -Dmaven.javadoc.skip=true -Drat.skip=true -Djacoco.skip=true -DskipITs -DskipTests
-      - name: Run Integration Test
-        run: ./mvnw -B clean install -f shardingsphere-test/shardingsphere-integration-test/pom.xml -Pit.env.docker -Dit.adapters=proxy -Dit.scenarios=encrypt -Dit.databases=MySQL
-  
-  mysql-jdbc-db:
-    name: MySQL-JDBC with DB
-    runs-on: ubuntu-latest
-    steps:
-      - name: Cache Maven Repos
-        uses: actions/cache@v2
-        with:
-          path: ~/.m2/repository
-          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
-          restore-keys: |
-            ${{ runner.os }}-maven-
-      - uses: actions/checkout@v2
-      - name: Set up JDK 8
-        uses: actions/setup-java@v1
-        with:
-          java-version: 8
-      - name: Build Project
-        run: ./mvnw -B clean install -Dmaven.javadoc.skip=true -Drat.skip=true -Djacoco.skip=true -DskipITs -DskipTests
-      - name: Run Integration Test
-        run: ./mvnw -B clean install -f shardingsphere-test/shardingsphere-integration-test/pom.xml -Pit.env.docker -Dit.adapters=jdbc -Dit.scenarios=db -Dit.databases=MySQL
-  
-  mysql-jdbc-tbl:
-    name: MySQL-JDBC with TBL
-    runs-on: ubuntu-latest
-    steps:
-      - name: Cache Maven Repos
-        uses: actions/cache@v2
-        with:
-          path: ~/.m2/repository
-          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
-          restore-keys: |
-            ${{ runner.os }}-maven-
-      - uses: actions/checkout@v2
-      - name: Set up JDK 8
-        uses: actions/setup-java@v1
-        with:
-          java-version: 8
-      - name: Build Project
-        run: ./mvnw -B clean install -Dmaven.javadoc.skip=true -Drat.skip=true -Djacoco.skip=true -DskipITs -DskipTests
-      - name: Run Integration Test
-        run: ./mvnw -B clean install -f shardingsphere-test/shardingsphere-integration-test/pom.xml -Pit.env.docker -Dit.adapters=jdbc -Dit.scenarios=tbl -Dit.databases=MySQL
-  
-  mysql-jdbc-repilca-query:
-    name: MySQL-JDBC with REPLICA-QUERY
-    runs-on: ubuntu-latest
-    steps:
-      - name: Cache Maven Repos
-        uses: actions/cache@v2
-        with:
-          path: ~/.m2/repository
-          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
-          restore-keys: |
-            ${{ runner.os }}-maven-
-      - uses: actions/checkout@v2
-      - name: Set up JDK 8
-        uses: actions/setup-java@v1
-        with:
-          java-version: 8
-      - name: Build Project
-        run: ./mvnw -B clean install -Dmaven.javadoc.skip=true -Drat.skip=true -Djacoco.skip=true -DskipITs -DskipTests
-      - name: Run Integration Test
-        run: ./mvnw -B clean install -f shardingsphere-test/shardingsphere-integration-test/pom.xml -Pit.env.docker -Dit.adapters=jdbc -Dit.scenarios=replica_query -Dit.databases=MySQL
-  
-  mysql-jdbc-dbtbl-with-proxy-repilca-query:
-    name: MySQL-JDBC with DBTBL-WITH-REPLICA-QUERY
-    runs-on: ubuntu-latest
-    steps:
-      - name: Cache Maven Repos
-        uses: actions/cache@v2
-        with:
-          path: ~/.m2/repository
-          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
-          restore-keys: |
-            ${{ runner.os }}-maven-
-      - uses: actions/checkout@v2
-      - name: Set up JDK 8
-        uses: actions/setup-java@v1
-        with:
-          java-version: 8
-      - name: Build Project
-        run: ./mvnw -B clean install -Dmaven.javadoc.skip=true -Drat.skip=true -Djacoco.skip=true -DskipITs -DskipTests
-      - name: Run Integration Test
-        run: ./mvnw -B clean install -f shardingsphere-test/shardingsphere-integration-test/pom.xml -Pit.env.docker -Dit.adapters=jdbc -Dit.scenarios=dbtbl_with_replica_query -Dit.databases=MySQL
-
-  mysql-jdbc-encrypt:
-    name: MySQL-JDBC with ENCRYPT
-    runs-on: ubuntu-latest
-    steps:
-      - name: Cache Maven Repos
-        uses: actions/cache@v2
-        with:
-          path: ~/.m2/repository
-          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
-          restore-keys: |
-            ${{ runner.os }}-maven-
-      - uses: actions/checkout@v2
-      - name: Set up JDK 8
-        uses: actions/setup-java@v1
-        with:
-          java-version: 8
-      - name: Build Project
-        run: ./mvnw -B clean install -Dmaven.javadoc.skip=true -Drat.skip=true -Djacoco.skip=true -DskipITs -DskipTests
-      - name: Run Integration Test
-        run: ./mvnw -B clean install -f shardingsphere-test/shardingsphere-integration-test/pom.xml -Pit.env.docker -Dit.adapters=jdbc -Dit.scenarios=encrypt -Dit.databases=MySQL
-
-  mysql-proxy-agent-metrics:
-    name: MySQL-Proxy with Agent Metrics
-    runs-on: ubuntu-latest
-    steps:
-      - name: Cache Maven Repos
-        uses: actions/cache@v2
-        with:
-          path: ~/.m2/repository
-          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
-          restore-keys: |
-            ${{ runner.os }}-maven-
-      - uses: actions/checkout@v2
-      - name: Set up JDK 8
-        uses: actions/setup-java@v1
-        with:
-          java-version: 8
-      - name: Build Project
-        run: ./mvnw -B clean install -Dmaven.javadoc.skip=true -Drat.skip=true -Djacoco.skip=true -DskipITs -DskipTests
-      - name: Run Integration Test
-        run: ./mvnw -B clean install -f shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-metrics/pom.xml -Pit.env.metrics
+        run: ./mvnw -B -DskipITs=false -Dmaven.javadoc.skip=true -Ddockerfile.skip.build=false -Drat.skip=true -Djacoco.skip=true -f shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/pom.xml -Dit.adapter=${{ matrix.adapter }} -Dit.scenario=db -Dit.database=${{ matrix.database }} verify

Review comment:
       `Ddockerfile.skip.build=false` can be true

##########
File path: shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-fixture/src/test/java/org/apache/shardingsphere/test/integration/junit/annotation/StorageType.java
##########
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.test.integration.junit.annotation;
+
+import lombok.Getter;
+import org.apache.shardingsphere.test.integration.junit.container.H2Container;
+import org.apache.shardingsphere.test.integration.junit.container.MySQLContainer;
+import org.apache.shardingsphere.test.integration.junit.container.StorageContainer;
+
+public enum StorageType {

Review comment:
       Can we consider about using dynamic SPI to instead of static enum?
   Just reference OCP.

##########
File path: shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-fixture/src/test/java/org/apache/shardingsphere/test/integration/junit/compose/NotSupportedException.java
##########
@@ -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.
+ */
+
+package org.apache.shardingsphere.test.integration.junit.compose;
+
+public class NotSupportedException extends Exception {

Review comment:
       The class name is too generic, can we consider add prefix to recognize it?

##########
File path: shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-fixture/src/test/java/org/apache/shardingsphere/test/integration/junit/condition/Condition.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.junit.condition;
+
+import java.lang.annotation.Annotation;
+
+@FunctionalInterface
+public interface Condition<T extends Annotation> {

Review comment:
       The class name is too generic, can we consider add prefix to recognize it?

##########
File path: shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-fixture/src/test/java/org/apache/shardingsphere/test/integration/junit/container/H2Container.java
##########
@@ -0,0 +1,54 @@
+/*
+ * 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.junit.container;
+
+import org.apache.shardingsphere.infra.database.type.dialect.H2DatabaseType;
+
+import javax.sql.DataSource;
+
+public class H2Container extends StorageContainer {

Review comment:
       H2 is focus memory, do we need H2 container?

##########
File path: shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-fixture/src/test/java/org/apache/shardingsphere/test/integration/junit/runner/ShardingSphereITSubCaseRunner.java
##########
@@ -0,0 +1,101 @@
+/*
+ * 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.junit.runner;
+
+import lombok.NonNull;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.shardingsphere.test.integration.common.SQLExecuteType;
+import org.apache.shardingsphere.test.integration.junit.annotation.Inject;
+import org.apache.shardingsphere.test.integration.junit.resolver.ConditionResolver;
+import org.junit.runners.BlockJUnit4ClassRunner;
+import org.junit.runners.model.InitializationError;
+import org.junit.runners.model.Statement;
+
+import java.lang.reflect.Field;
+
+@Slf4j
+public class ShardingSphereITSubCaseRunner extends BlockJUnit4ClassRunner {
+    
+    private final TestCaseBeanContext context;
+    
+    @NonNull
+    private final ConditionResolver resolver;
+    
+    public ShardingSphereITSubCaseRunner(final Class<?> testClass, final TestCaseBeanContext context, final ConditionResolver resolver) throws InitializationError {
+        super(testClass);
+        this.context = context;
+        this.resolver = resolver;
+    }
+    
+    @Override
+    protected Object createTest() throws Exception {
+        final Object testInstance = super.createTest();
+        getTestClass().getAnnotatedFields(Inject.class)
+                .forEach(e -> {
+                    try {
+                        Field field = e.getField();
+                        field.setAccessible(true);
+                        if (field.getType() == String.class) {
+                            field.set(testInstance, context.getBeanByName(field.getName()));
+                        } else {
+                            field.set(testInstance, context.getBean(e.getType()));
+                        }
+                    } catch (IllegalAccessException ex) {
+                        throw new RuntimeException(ex.getMessage(), ex);
+                    }
+                });
+        return testInstance;
+    }
+
+//    @Override
+//    protected List<FrameworkMethod> computeTestMethods() {
+//        return super.computeTestMethods().stream().filter(e -> {
+//            if (resolver.filter(e)) {
+//                log.warn("{} was ignored.", e.getMethod());
+//                return true;
+//            }
+//            return false;
+//        }).collect(Collectors.toList());
+//    }

Review comment:
       We need to remove comment codes

##########
File path: shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-fixture/src/test/java/org/apache/shardingsphere/test/integration/env/dataset/DataSetEnvironmentManager.java
##########
@@ -122,7 +118,6 @@ private String generateInsertSQL(final String tableName, final Collection<DataSe
     
     /**
      * Clear data.

Review comment:
       Unnecessary change?

##########
File path: shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-fixture/src/test/java/org/apache/shardingsphere/test/integration/junit/annotation/AfterSuite.java
##########
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.test.integration.junit.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface AfterSuite {

Review comment:
       The class name is too generic, can we consider add prefix to recognize it?

##########
File path: shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-fixture/src/test/java/org/apache/shardingsphere/test/integration/env/dataset/DataSetEnvironmentManager.java
##########
@@ -90,12 +91,7 @@ public void fillData() throws SQLException, ParseException {
             }
             fillDataTasks.add(new InsertTask(actualDataSources.get(dataNode.getDataSourceName()), insertSQL, sqlValueGroups));
         }
-        try {
-            EXECUTOR_SERVICE_MANAGER.getExecutorService().invokeAll(fillDataTasks);
-            // CHECKSTYLE:OFF
-        } catch (final Exception ex) {
-            // CHECKSTYLE:ON
-        }
+        EXECUTOR_SERVICE_MANAGER.getExecutorService().invokeAll(fillDataTasks);

Review comment:
       Unnecessary change?

##########
File path: shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-fixture/src/test/java/org/apache/shardingsphere/test/integration/junit/annotation/BeforeSuite.java
##########
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.test.integration.junit.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface BeforeSuite {

Review comment:
       The class name is too generic, can we consider add prefix to recognize it?

##########
File path: shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-fixture/src/test/java/org/apache/shardingsphere/test/integration/env/dataset/DataSetEnvironmentManager.java
##########
@@ -68,11 +68,12 @@ public DataSetEnvironmentManager(final String dataSetFile, final Map<String, Dat
     
     /**
      * Fill data.
-     * 
-     * @throws SQLException SQL exception
+     *

Review comment:
       Unnecessary change?

##########
File path: shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-fixture/src/test/java/org/apache/shardingsphere/test/integration/junit/annotation/Conditional.java
##########
@@ -15,28 +15,24 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.test.integration.engine.junit.parallel.annotaion;
+package org.apache.shardingsphere.test.integration.junit.annotation;
+
+import org.apache.shardingsphere.test.integration.junit.condition.Condition;
 
-import java.lang.annotation.Documented;
 import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
-/**
- * Parallel runtime strategy.
- */
-@Documented
-@Target(ElementType.TYPE)
+@Target(ElementType.ANNOTATION_TYPE)
 @Retention(RetentionPolicy.RUNTIME)
-@Inherited
-public @interface ParallelRuntimeStrategy {
+public @interface Conditional {

Review comment:
       The class name is too generic, can we consider add prefix to recognize it?

##########
File path: shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-fixture/src/test/java/org/apache/shardingsphere/test/integration/junit/annotation/Inject.java
##########
@@ -0,0 +1,28 @@
+/*
+ * 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.junit.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target(ElementType.FIELD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Inject {

Review comment:
       The class name is too generic, can we consider add prefix to recognize it?

##########
File path: shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-fixture/src/test/java/org/apache/shardingsphere/test/integration/junit/annotation/StorageType.java
##########
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.test.integration.junit.annotation;
+
+import lombok.Getter;
+import org.apache.shardingsphere.test.integration.junit.container.H2Container;
+import org.apache.shardingsphere.test.integration.junit.container.MySQLContainer;
+import org.apache.shardingsphere.test.integration.junit.container.StorageContainer;
+
+public enum StorageType {

Review comment:
       The class name is too generic, can we consider add prefix to recognize it?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] codecov-io commented on pull request #9461: [WIP] Refactor IT Engine

Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #9461:
URL: https://github.com/apache/shardingsphere/pull/9461#issuecomment-785637372


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/9461?src=pr&el=h1) Report
   > Merging [#9461](https://codecov.io/gh/apache/shardingsphere/pull/9461?src=pr&el=desc) (10c7d98) into [master](https://codecov.io/gh/apache/shardingsphere/commit/25187f0947fa1a272b8559d1cecfa4d2fc6a2a76?el=desc) (25187f0) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/9461/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so)](https://codecov.io/gh/apache/shardingsphere/pull/9461?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff            @@
   ##             master    #9461   +/-   ##
   =========================================
     Coverage     68.58%   68.58%           
     Complexity      670      670           
   =========================================
     Files          1651     1651           
     Lines         27244    27244           
     Branches       4803     4803           
   =========================================
     Hits          18684    18684           
     Misses         7211     7211           
     Partials       1349     1349           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/9461?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/9461?src=pr&el=footer). Last update [25187f0...10c7d98](https://codecov.io/gh/apache/shardingsphere/pull/9461?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] codecov-io edited a comment on pull request #9461: Refactor IT Engine

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #9461:
URL: https://github.com/apache/shardingsphere/pull/9461#issuecomment-785637372


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/9461?src=pr&el=h1) Report
   > Merging [#9461](https://codecov.io/gh/apache/shardingsphere/pull/9461?src=pr&el=desc) (79f6c2f) into [master](https://codecov.io/gh/apache/shardingsphere/commit/64f67c6ee769a05fcb9dcf77439857ec458feaba?el=desc) (64f67c6) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/9461/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so)](https://codecov.io/gh/apache/shardingsphere/pull/9461?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff            @@
   ##             master    #9461   +/-   ##
   =========================================
     Coverage     68.06%   68.06%           
     Complexity      671      671           
   =========================================
     Files          1655     1655           
     Lines         27306    27306           
     Branches       4810     4810           
   =========================================
     Hits          18586    18586           
     Misses         7369     7369           
     Partials       1351     1351           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/9461?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/9461?src=pr&el=footer). Last update [64f67c6...79f6c2f](https://codecov.io/gh/apache/shardingsphere/pull/9461?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org