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

zhonghongsheng 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 cdb414ab554 Add pipeline E2E IT log and make sure they are serial 
(#23379)
cdb414ab554 is described below

commit cdb414ab554a41c29ee5e508f17eaabd419c88d4
Author: Xinze Guo <[email protected]>
AuthorDate: Sun Jan 8 13:44:29 2023 +0800

    Add pipeline E2E IT log and make sure they are serial (#23379)
    
    * Add pipeline e2e log and make sure they are serial
    
    * Rename e2e to E2E at log
    
    * Fix codestyle
    
    * Rollback rename
    
    * move log
    
    * remove base log
---
 test/e2e/pipeline/pom.xml                             | 19 +++++++++++++++++++
 .../cases/createtable/CreateTableSQLGeneratorIT.java  |  1 +
 .../migration/general/MySQLMigrationGeneralE2EIT.java |  3 ++-
 .../general/PostgreSQLMigrationGeneralE2EIT.java      |  2 ++
 .../primarykey/TextPrimaryKeyMigrationE2EIT.java      |  9 +++++++--
 5 files changed, 31 insertions(+), 3 deletions(-)

diff --git a/test/e2e/pipeline/pom.xml b/test/e2e/pipeline/pom.xml
index 4153fc7150a..1a465b8bea9 100644
--- a/test/e2e/pipeline/pom.xml
+++ b/test/e2e/pipeline/pom.xml
@@ -111,6 +111,25 @@
                     </execution>
                 </executions>
             </plugin>
+            
+            <plugin>
+                <artifactId>maven-failsafe-plugin</artifactId>
+                <configuration>
+                    <parallel>methods</parallel>
+                    <threadCount>1</threadCount>
+                    <!-- TODO if use junit parameterized test, the option does 
not ensure that the first time an error occurs it will stop-->
+                    <skipAfterFailureCount>1</skipAfterFailureCount>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>integration-tests</id>
+                        <goals>
+                            <goal>integration-test</goal>
+                            <goal>verify</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
 </project>
diff --git 
a/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/createtable/CreateTableSQLGeneratorIT.java
 
b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/createtable/CreateTableSQLGeneratorIT.java
index 99237bbde24..1cdb5a0e2b2 100644
--- 
a/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/createtable/CreateTableSQLGeneratorIT.java
+++ 
b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/createtable/CreateTableSQLGeneratorIT.java
@@ -131,6 +131,7 @@ public final class CreateTableSQLGeneratorIT {
                 assertSQL(actualDDLs, getVersionOutput(each.getOutputs(), 
majorVersion));
             }
         }
+        log.info("{} E2E IT finished, database type={}, docker image={}", 
this.getClass().getName(), testParam.getDatabaseType(), 
testParam.getStorageContainerImage());
     }
     
     private void assertSQL(final Collection<String> actualSQL, final 
Collection<String> expectedSQL) {
diff --git 
a/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/MySQLMigrationGeneralE2EIT.java
 
b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/MySQLMigrationGeneralE2EIT.java
index 35924dc38b6..9a345a3adbf 100644
--- 
a/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/MySQLMigrationGeneralE2EIT.java
+++ 
b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/MySQLMigrationGeneralE2EIT.java
@@ -53,7 +53,6 @@ public final class MySQLMigrationGeneralE2EIT extends 
AbstractMigrationE2EIT {
     public MySQLMigrationGeneralE2EIT(final PipelineTestParameter testParam) {
         super(testParam);
         this.testParam = testParam;
-        log.info("testParameter:{}", testParam);
     }
     
     @Parameters(name = "{0}")
@@ -76,6 +75,7 @@ public final class MySQLMigrationGeneralE2EIT extends 
AbstractMigrationE2EIT {
     
     @Test
     public void assertMigrationSuccess() throws SQLException, 
InterruptedException {
+        log.info("assertMigrationSuccess testParam:{}", testParam);
         addMigrationProcessConfig();
         createSourceOrderTable();
         createSourceOrderItemTable();
@@ -104,6 +104,7 @@ public final class MySQLMigrationGeneralE2EIT extends 
AbstractMigrationE2EIT {
         List<String> lastJobIds = listJobId();
         assertThat(lastJobIds.size(), is(0));
         
assertGreaterThanOrderTableInitRows(PipelineBaseE2EIT.TABLE_INIT_ROW_COUNT, "");
+        log.info("{} E2E IT finished, database type={}, docker image={}", 
this.getClass().getName(), testParam.getDatabaseType(), 
testParam.getStorageContainerImage());
     }
     
     private void assertMigrationSuccessById(final String jobId, final String 
algorithmType) throws SQLException, InterruptedException {
diff --git 
a/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/PostgreSQLMigrationGeneralE2EIT.java
 
b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/PostgreSQLMigrationGeneralE2EIT.java
index 5cbb693c1f6..0d035e7bc4d 100644
--- 
a/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/PostgreSQLMigrationGeneralE2EIT.java
+++ 
b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/PostgreSQLMigrationGeneralE2EIT.java
@@ -76,6 +76,7 @@ public final class PostgreSQLMigrationGeneralE2EIT extends 
AbstractMigrationE2EI
     
     @Test
     public void assertMigrationSuccess() throws SQLException, 
InterruptedException {
+        log.info("assertMigrationSuccess testParam:{}", testParam);
         addMigrationProcessConfig();
         createSourceSchema(PipelineBaseE2EIT.SCHEMA_NAME);
         createSourceOrderTable();
@@ -99,6 +100,7 @@ public final class PostgreSQLMigrationGeneralE2EIT extends 
AbstractMigrationE2EI
         List<String> lastJobIds = listJobId();
         assertThat(lastJobIds.size(), is(0));
         
assertGreaterThanOrderTableInitRows(PipelineBaseE2EIT.TABLE_INIT_ROW_COUNT, 
PipelineBaseE2EIT.SCHEMA_NAME);
+        log.info("{} E2E IT finished, database type={}, docker image={}", 
this.getClass().getName(), testParam.getDatabaseType(), 
testParam.getStorageContainerImage());
     }
     
     private void checkOrderMigration() throws SQLException, 
InterruptedException {
diff --git 
a/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/primarykey/TextPrimaryKeyMigrationE2EIT.java
 
b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/primarykey/TextPrimaryKeyMigrationE2EIT.java
index cc3c570fbee..9be30b720c9 100644
--- 
a/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/primarykey/TextPrimaryKeyMigrationE2EIT.java
+++ 
b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/primarykey/TextPrimaryKeyMigrationE2EIT.java
@@ -21,11 +21,11 @@ import lombok.extern.slf4j.Slf4j;
 import org.apache.shardingsphere.infra.database.type.dialect.MySQLDatabaseType;
 import 
org.apache.shardingsphere.infra.database.type.dialect.OpenGaussDatabaseType;
 import 
org.apache.shardingsphere.infra.database.type.dialect.PostgreSQLDatabaseType;
+import 
org.apache.shardingsphere.sharding.algorithm.keygen.UUIDKeyGenerateAlgorithm;
+import 
org.apache.shardingsphere.test.e2e.data.pipeline.cases.base.PipelineBaseE2EIT;
 import 
org.apache.shardingsphere.test.e2e.data.pipeline.cases.migration.AbstractMigrationE2EIT;
 import 
org.apache.shardingsphere.test.e2e.data.pipeline.env.enums.PipelineEnvTypeEnum;
 import 
org.apache.shardingsphere.test.e2e.data.pipeline.framework.param.PipelineTestParameter;
-import 
org.apache.shardingsphere.sharding.algorithm.keygen.UUIDKeyGenerateAlgorithm;
-import 
org.apache.shardingsphere.test.e2e.data.pipeline.cases.base.PipelineBaseE2EIT;
 import 
org.apache.shardingsphere.test.e2e.env.container.atomic.util.DatabaseTypeUtil;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -48,8 +48,11 @@ import static org.hamcrest.Matchers.is;
 @Slf4j
 public class TextPrimaryKeyMigrationE2EIT extends AbstractMigrationE2EIT {
     
+    private final PipelineTestParameter testParam;
+    
     public TextPrimaryKeyMigrationE2EIT(final PipelineTestParameter testParam) 
{
         super(testParam);
+        this.testParam = testParam;
     }
     
     @Override
@@ -81,6 +84,7 @@ public class TextPrimaryKeyMigrationE2EIT extends 
AbstractMigrationE2EIT {
     
     @Test
     public void assertTextPrimaryMigrationSuccess() throws SQLException, 
InterruptedException {
+        log.info("assertTextPrimaryMigrationSuccess testParam:{}", testParam);
         createSourceOrderTable();
         batchInsertOrder();
         addMigrationProcessConfig();
@@ -97,6 +101,7 @@ public class TextPrimaryKeyMigrationE2EIT extends 
AbstractMigrationE2EIT {
             List<String> lastJobIds = listJobId();
             assertThat(lastJobIds.size(), is(0));
         }
+        log.info("{} E2E IT finished, database type={}, docker image={}", 
this.getClass().getName(), testParam.getDatabaseType(), 
testParam.getStorageContainerImage());
     }
     
     private void batchInsertOrder() throws SQLException {

Reply via email to