You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "iamhucong (via GitHub)" <gi...@apache.org> on 2023/06/28 11:27:48 UTC

[GitHub] [shardingsphere] iamhucong opened a new pull request, #26668: Optimizing E2E.

iamhucong opened a new pull request, #26668:
URL: https://github.com/apache/shardingsphere/pull/26668

   - Optimizing E2E logs.
   - Fix the issue of the database container not being fully initialized when starting e2e tests.
   
   ---
   
   Before committing this PR, I'm sure that I have checked the following options:
   - [ ] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
   - [ ] I have self-reviewed the commit code.
   - [ ] I have (or in comment I request) added corresponding labels for the pull request.
   - [ ] I have passed maven check locally : `./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
   - [ ] I have made corresponding changes to the documentation.
   - [ ] I have added corresponding unit tests for my changes.
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] iamhucong commented on a diff in pull request #26668: Optimizing E2E.

Posted by "iamhucong (via GitHub)" <gi...@apache.org>.
iamhucong commented on code in PR #26668:
URL: https://github.com/apache/shardingsphere/pull/26668#discussion_r1257643982


##########
test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/framework/param/model/CaseTestParameter.java:
##########
@@ -44,6 +44,8 @@ public final class CaseTestParameter implements E2ETestParameter {
     
     @Override
     public String toString() {
-        return String.format("%s: %s -> %s -> %s", adapter, scenario, databaseType.getType(), testCaseContext.getTestCase().getSql());
+        final String sql = null == testCaseContext ? null : testCaseContext.getTestCase().getSql();

Review Comment:
   Okay.



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] strongduanmu commented on a diff in pull request #26668: Optimizing E2E.

Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu commented on code in PR #26668:
URL: https://github.com/apache/shardingsphere/pull/26668#discussion_r1257587304


##########
test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/framework/param/model/CaseTestParameter.java:
##########
@@ -44,6 +44,8 @@ public final class CaseTestParameter implements E2ETestParameter {
     
     @Override
     public String toString() {
-        return String.format("%s: %s -> %s -> %s", adapter, scenario, databaseType.getType(), testCaseContext.getTestCase().getSql());
+        final String sql = null == testCaseContext ? null : testCaseContext.getTestCase().getSql();

Review Comment:
   Please remove final modifier here.



##########
test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/storage/DockerStorageContainer.java:
##########
@@ -76,11 +80,12 @@ protected void configure() {
             withClasspathResourceMapping(new ScenarioDataPath(scenario).getInitSQLResourcePath(Type.EXPECTED, databaseType) + "/01-expected-init.sql",
                     "/docker-entrypoint-initdb.d/01-expected-init.sql", BindMode.READ_ONLY);
         }
+        withClasspathResourceMapping("/container/init-sql/" + databaseType.getType().toLowerCase() + "/99-be-ready.sql", "/docker-entrypoint-initdb.d/99-be-ready.sql", BindMode.READ_ONLY);

Review Comment:
   Why add 99-be-ready.sql?



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] iamhucong commented on a diff in pull request #26668: Optimizing E2E.

Posted by "iamhucong (via GitHub)" <gi...@apache.org>.
iamhucong commented on code in PR #26668:
URL: https://github.com/apache/shardingsphere/pull/26668#discussion_r1257639147


##########
test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/storage/DockerStorageContainer.java:
##########
@@ -76,11 +80,12 @@ protected void configure() {
             withClasspathResourceMapping(new ScenarioDataPath(scenario).getInitSQLResourcePath(Type.EXPECTED, databaseType) + "/01-expected-init.sql",
                     "/docker-entrypoint-initdb.d/01-expected-init.sql", BindMode.READ_ONLY);
         }
+        withClasspathResourceMapping("/container/init-sql/" + databaseType.getType().toLowerCase() + "/99-be-ready.sql", "/docker-entrypoint-initdb.d/99-be-ready.sql", BindMode.READ_ONLY);

Review Comment:
   This is to create a 'ready' user, which is used to indicate to the code that the initialization scripts have all been executed.



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] strongduanmu merged pull request #26668: Optimizing E2E.

Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu merged PR #26668:
URL: https://github.com/apache/shardingsphere/pull/26668


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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