You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/10/08 15:47:36 UTC

[GitHub] [incubator-seatunnel] hailin0 opened a new pull request, #3028: [Improve][E2E] Improve testcase output log style

hailin0 opened a new pull request, #3028:
URL: https://github.com/apache/incubator-seatunnel/pull/3028

   <!--
   
   Thank you for contributing to SeaTunnel! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [GITHUB issue](https://github.com/apache/incubator-seatunnel/issues).
   
     - Name the pull request in the form "[Feature] [component] Title of the pull request", where *Feature* can be replaced by `Hotfix`, `Bug`, etc.
   
     - Minor fixes should be named following this pattern: `[hotfix] [docs] Fix typo in README.md doc`.
   
   -->
   
   ## Purpose of this pull request
   
   Improve testcase output log style
   
   ## Check list
   
   * [ ] Code changed are covered with tests, or it does not need tests for reason:
   * [ ] If any new Jar binary package adding in your PR, please add License Notice according
     [New License Guide](https://github.com/apache/incubator-seatunnel/blob/dev/docs/en/contribution/new-license.md)
   * [ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/incubator-seatunnel/tree/dev/docs
   


-- 
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: commits-unsubscribe@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] hailin0 commented on pull request #3028: [Improve][E2E] Improve testcase output log style

Posted by GitBox <gi...@apache.org>.
hailin0 commented on PR #3028:
URL: https://github.com/apache/incubator-seatunnel/pull/3028#issuecomment-1272446126

   #3031 
   <img width="1704" alt="image" src="https://user-images.githubusercontent.com/14371345/194736589-886ba541-7105-4fa0-87e2-386e80eb8ee5.png">
   


-- 
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: commits-unsubscribe@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] hailin0 commented on pull request #3028: [Improve][E2E] Improve testcase output log style

Posted by GitBox <gi...@apache.org>.
hailin0 commented on PR #3028:
URL: https://github.com/apache/incubator-seatunnel/pull/3028#issuecomment-1272351674

   <img width="1298" alt="image" src="https://user-images.githubusercontent.com/14371345/194717303-953311ba-91b1-43b8-b99f-5ce9478d6feb.png">
   


-- 
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: commits-unsubscribe@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] TyrantLucifer commented on pull request #3028: [Improve][E2E] Improve testcase output log style

Posted by GitBox <gi...@apache.org>.
TyrantLucifer commented on PR #3028:
URL: https://github.com/apache/incubator-seatunnel/pull/3028#issuecomment-1272441818

   > network timeout
   > 
   > <img alt="image" width="1298" src="https://user-images.githubusercontent.com/14371345/194717303-953311ba-91b1-43b8-b99f-5ce9478d6feb.png">
   
   Restarted yet.


-- 
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: commits-unsubscribe@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] EricJoy2048 merged pull request #3028: [Improve][E2E] Improve testcase output log style

Posted by GitBox <gi...@apache.org>.
EricJoy2048 merged PR #3028:
URL: https://github.com/apache/incubator-seatunnel/pull/3028


-- 
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: commits-unsubscribe@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] hailin0 commented on a diff in pull request #3028: [Improve][E2E] Improve testcase output log style

Posted by GitBox <gi...@apache.org>.
hailin0 commented on code in PR #3028:
URL: https://github.com/apache/incubator-seatunnel/pull/3028#discussion_r990656928


##########
seatunnel-e2e/seatunnel-flink-connector-v2-e2e/connector-mongodb-flink-e2e/src/test/java/org/apache/seatunnel/e2e/flink/v2/mongodb/MongodbIT.java:
##########
@@ -90,7 +91,7 @@ public void startMongoContainer() {
                 .forPort(MONGODB_PORT)
                 .forStatusCodeMatching(response -> response == HTTP_OK || response == HTTP_UNAUTHORIZED)
                 .withStartupTimeout(Duration.ofMinutes(2)))
-            .withLogConsumer(new Slf4jLogConsumer(log));
+            .withLogConsumer(new Slf4jLogConsumer(DockerLoggerFactory.getLogger(MONGODB_IMAGE)));

Review Comment:
   log example:
   
   <img width="1700" alt="image" src="https://user-images.githubusercontent.com/14371345/194716032-c3f0e8f0-75e0-46a3-892a-6dbd85590be1.png">
   



##########
seatunnel-e2e/seatunnel-e2e-common/src/test/java/org/apache/seatunnel/e2e/common/container/AbstractTestContainer.java:
##########
@@ -102,8 +102,18 @@ protected Container.ExecResult executeCommand(GenericContainer<?> container, Str
         command.addAll(getExtraStartShellCommands());
 
         Container.ExecResult execResult = container.execInContainer("bash", "-c", String.join(" ", command));
-        LOG.info(execResult.getStdout());
-        LOG.error(execResult.getStderr());
+        if (execResult.getStdout() != null && execResult.getStdout().length() > 0) {
+            LOG.info("\n==================== ExecuteConfigFile: {} STDOUT start ====================\n"
+                    + "{}"
+                    + "\n==================== ExecuteConfigFile: {} STDOUT end   ====================",
+                configPath, execResult.getStdout(), configPath);
+        }
+        if (execResult.getStderr() != null && execResult.getStderr().length() > 0) {
+            LOG.error("\n==================== ExecuteConfigFile: {} STDERR start ====================\n"
+                    + "{}"
+                    + "\n==================== ExecuteConfigFile: {} STDERR end   ====================",
+                configPath, execResult.getStderr(), configPath);
+        }

Review Comment:
   log example
   
   <img width="1700" alt="image" src="https://user-images.githubusercontent.com/14371345/194716194-004ea545-a242-4ac5-9e3c-4c91c6e163af.png">
   



-- 
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: commits-unsubscribe@seatunnel.apache.org

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