You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/04/13 02:07:51 UTC

[GitHub] [hadoop-ozone] smengcl opened a new pull request #813: HDDS-3309. Add TimedOutTestsListener to surefire

smengcl opened a new pull request #813: HDDS-3309. Add TimedOutTestsListener to surefire
URL: https://github.com/apache/hadoop-ozone/pull/813
 
 
   ## What changes were proposed in this pull request?
   
   Add TimedOutTestsListener as a listener to maven-surefire-plugin like Hadoop [does](https://github.com/apache/hadoop/blob/1189af4746919774035f5d64ccb4d2ce21905aaa/hadoop-hdfs-project/hadoop-hdfs/pom.xml#L233-L238)
   
   Previously discussed under https://github.com/apache/hadoop-ozone/pull/750.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-3309
   
   ## How was this patch tested?
   
   The patch should make the timed out tests print out the stack trace (if any). Checks itself.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] adoroszlai commented on a change in pull request #813: HDDS-3309. Add TimedOutTestsListener to surefire

Posted by GitBox <gi...@apache.org>.
adoroszlai commented on a change in pull request #813: HDDS-3309. Add TimedOutTestsListener to surefire
URL: https://github.com/apache/hadoop-ozone/pull/813#discussion_r410138067
 
 

 ##########
 File path: hadoop-hdds/common/src/test/java/org/apache/hadoop/test/TimedOutTestsListener.java
 ##########
 @@ -31,6 +31,7 @@
 
 import org.apache.hadoop.util.StringUtils;
 
+import org.junit.runner.Description;
 
 Review comment:
   Unused import.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] smengcl edited a comment on issue #813: HDDS-3309. Add TimedOutTestsListener to surefire

Posted by GitBox <gi...@apache.org>.
smengcl edited a comment on issue #813: HDDS-3309. Add TimedOutTestsListener to surefire
URL: https://github.com/apache/hadoop-ozone/pull/813#issuecomment-614335270
 
 
   > > Looks like hadoop-hdds can't locate the class in hadoop-ozone
   > 
   > I started working on a similar listener (for debugging disk space usage in tests) and ran into this classpath issue. Solved it by moving these test utilities to a new module. I'll create a PR with the base change to unblock you. With that change you'll be able to add the `TimedOutTestsListener` globally.
   
   Thanks. btw It looks to me the root cause of the issue is that `Apache Hadoop HDDS Config`(`hadoop-hdds-config`) is compiled before `Apache Hadoop Distributed Data Store Common`(`hadoop-hdds-common`). The latter has the `TimedOutTestsListener`. One easy fix might just be to move the `TimedOutTestsListener` class to a module that is compiled early enough.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] smengcl edited a comment on issue #813: HDDS-3309. Add TimedOutTestsListener to surefire

Posted by GitBox <gi...@apache.org>.
smengcl edited a comment on issue #813: HDDS-3309. Add TimedOutTestsListener to surefire
URL: https://github.com/apache/hadoop-ozone/pull/813#issuecomment-614335270
 
 
   > > Looks like hadoop-hdds can't locate the class in hadoop-ozone
   > 
   > I started working on a similar listener (for debugging disk space usage in tests) and ran into this classpath issue. Solved it by moving these test utilities to a new module. I'll create a PR with the base change to unblock you. With that change you'll be able to add the `TimedOutTestsListener` globally.
   
   It looks to me the root cause of the issue is that `Apache Hadoop HDDS Config`(`hadoop-hdds-config`) is compiled before `Apache Hadoop Distributed Data Store Common`(`hadoop-hdds-common`). The latter has the `TimedOutTestsListener`. One easy fix might just be to move the `TimedOutTestsListener` class to a module that is compiled early enough.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] smengcl edited a comment on issue #813: HDDS-3309. Add TimedOutTestsListener to surefire

Posted by GitBox <gi...@apache.org>.
smengcl edited a comment on issue #813: HDDS-3309. Add TimedOutTestsListener to surefire
URL: https://github.com/apache/hadoop-ozone/pull/813#issuecomment-614119825
 
 
   > Thanks @smengcl for working on this. I tested the change by configuring very short timeout. Here are my observations:
   > 
   > 1. The `parallel-tests` profile is not enabled by default.  The listener should be configured globally, outside of profiles to take effect.  I think it should be added to the root `pom.xml` here:
   > 
   > https://github.com/apache/hadoop-ozone/blob/c9a1925537312eb950d596dbae2c7e4d91f9fd59/pom.xml#L1686-L1724
   > 
   > 1. `TimedOutTestsListener` is not notified of "fork timeouts", only of individual test timeout, ie. the kind which you wanted to add in #750.  So I think we need both changes.
   
   Thanks for the comment @adoroszlai . I can confirm `parallel-tests` isn't enabled and we should add the listener to root. Will post update.
   
   I also played with the maven surefire listener a bit. Some observations:
   
   1. `testStarted()` will always be executed at test start, as in its name. But the current `TimedOutTestsListener` doesn't implement it. We can flush the output to make the message appear in e.g. `org.apache.hadoop.ozone.om.TestOzoneManagerRestart-output.txt` even if the test is eventually shutdown by fork timeout (`forkedProcessTimeoutInSeconds`). This way we can print the test name at least. Even if the test fork is terminated by timeout (prints `Killing self fork JVM. Received SHUTDOWN command from Maven shutdown hook.` in `<DATETIME>-jvmRunX.dump`), we can know which test was it running in the output text file.
   
   2. `testFailure` will not be executed when fork JVM for testing timed out. There appears to be one forked JVM **per test class** (See help for [<forkMode>](https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html). CMIIW).
   
   3. I'm wondering if we could utilize shutdownHook to capture the failed test name and other info. Probably not. But I'll dig a bit.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] smengcl commented on issue #813: HDDS-3309. Add TimedOutTestsListener to surefire

Posted by GitBox <gi...@apache.org>.
smengcl commented on issue #813: HDDS-3309. Add TimedOutTestsListener to surefire
URL: https://github.com/apache/hadoop-ozone/pull/813#issuecomment-614269990
 
 
   Looks like hadoop-hdds can't locate the class in hadoop-ozone

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] smengcl commented on issue #813: HDDS-3309. Add TimedOutTestsListener to surefire

Posted by GitBox <gi...@apache.org>.
smengcl commented on issue #813: HDDS-3309. Add TimedOutTestsListener to surefire
URL: https://github.com/apache/hadoop-ozone/pull/813#issuecomment-614119825
 
 
   > Thanks @smengcl for working on this. I tested the change by configuring very short timeout. Here are my observations:
   > 
   > 1. The `parallel-tests` profile is not enabled by default.  The listener should be configured globally, outside of profiles to take effect.  I think it should be added to the root `pom.xml` here:
   > 
   > https://github.com/apache/hadoop-ozone/blob/c9a1925537312eb950d596dbae2c7e4d91f9fd59/pom.xml#L1686-L1724
   > 
   > 1. `TimedOutTestsListener` is not notified of "fork timeouts", only of individual test timeout, ie. the kind which you wanted to add in #750.  So I think we need both changes.
   
   Thanks for the comment @adoroszlai .
   
   I also played with the maven surefire listener a bit. Some observations:
   
   1. `testStarted()` will always be executed at test start, as in its name. But the current `TimedOutTestsListener` doesn't implement it. We can flush the output to make the message appear in e.g. `org.apache.hadoop.ozone.om.TestOzoneManagerRestart-output.txt` even if the test is eventually shutdown by fork timeout (`forkedProcessTimeoutInSeconds`). This way we can print the test name at least. Even if the test fork is terminated by timeout (prints `Killing self fork JVM. Received SHUTDOWN command from Maven shutdown hook.` in `<DATETIME>-jvmRunX.dump`), we can know which test was it running in the output text file.
   
   2. `testFailure` will not be executed when fork JVM for testing timed out. There appears to be one forked JVM **per test class** (See help for [<forkMode>](https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html). CMIIW).
   
   3. I'm wondering if we could utilize shutdownHook to capture the failed test name and other info. Probably not. But I'll dig a bit.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] smengcl commented on issue #813: HDDS-3309. Add TimedOutTestsListener to surefire

Posted by GitBox <gi...@apache.org>.
smengcl commented on issue #813: HDDS-3309. Add TimedOutTestsListener to surefire
URL: https://github.com/apache/hadoop-ozone/pull/813#issuecomment-614335270
 
 
   > > Looks like hadoop-hdds can't locate the class in hadoop-ozone
   > 
   > I started working on a similar listener (for debugging disk space usage in tests) and ran into this classpath issue. Solved it by moving these test utilities to a new module. I'll create a PR with the base change to unblock you. With that change you'll be able to add the `TimedOutTestsListener` globally.
   
   It looks to me the root cause of the issue is that `Apache Hadoop HDDS Config` is compiled before `Apache Hadoop Distributed Data Store Common`(`hadoop-hdds-common`). The latter has the `TimedOutTestsListener`. One easy fix might just be to move the `TimedOutTestsListener` class to a module that is compiled early enough.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] adoroszlai commented on issue #813: HDDS-3309. Add TimedOutTestsListener to surefire

Posted by GitBox <gi...@apache.org>.
adoroszlai commented on issue #813: HDDS-3309. Add TimedOutTestsListener to surefire
URL: https://github.com/apache/hadoop-ozone/pull/813#issuecomment-614286645
 
 
   > Looks like hadoop-hdds can't locate the class in hadoop-ozone
   
   I started working on a similar listener (for debugging disk space usage in tests) and ran into this classpath issue.  Solved it by moving these test utilities to a new module.  I'll create a PR with the base change to unblock you.  With that change you'll be able to add the `TimedOutTestsListener` globally.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org