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/15 16:17:53 UTC

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

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