elek commented on issue #723: HDDS-3281. Add timeouts to all robot tests
URL: https://github.com/apache/hadoop-ozone/pull/723#issuecomment-604911971
 
 
   > @adoroszlai, I think even with that limitation the timeout will help us 
isolate the problem. Let's say the acceptance suit is cancelled, we could still 
get to know which test contributed to the time out.
   
   There are two timeouts: 
     1. timeout of the test (measured between two steps)
     2. timeout of one step test steps
   
   As far as I understood @adoroszlai warned us that even if we have a test 
level timeout it doesn't help at all, if 2nd is not in place. If one `curl` 
based command is hanging (and robot test doesn't do a `kill`) it won't be 
stopped (and we won't have any logs / results).
   
   But I agree even without 2nd, it's good to have this patch. 
   
   On the other hand, I tested it with sleep, and it seems to be working for 
me...
   
   ```
   *** Settings ***
   Documentation       Timeout test
   Library             OperatingSystem
   Test Timeout        20 seconds
   #Resource            commonlib.robot
   
   *** Test cases ***
   Execute PI calculation
                       ${output} =      Run                     sleep 60
                       Should Contain   ${output}               completed 
successfully
   ```
   
   ```
   time robot test.robot
   
==============================================================================
   Test :: Timeout test
   
==============================================================================
   Execute PI calculation                                                | FAIL 
|
   Test timeout 20 seconds exceeded.
   
------------------------------------------------------------------------------
   Test :: Timeout test                                                  | FAIL 
|
   1 critical test, 0 passed, 1 failed
   1 test total, 0 passed, 1 failed
   
==============================================================================
   Output:  
/home/elek/projects/ozone/hadoop-ozone/dist/target/ozone-0.5.0-SNAPSHOT/smoketest/output.xml
   Log:     
/home/elek/projects/ozone/hadoop-ozone/dist/target/ozone-0.5.0-SNAPSHOT/smoketest/log.html
   Report:  
/home/elek/projects/ozone/hadoop-ozone/dist/target/ozone-0.5.0-SNAPSHOT/smoketest/report.html
   robot test.robot  0.25s user 0.03s system 1% cpu 20.285 total
   ```
   
   As you see my sleep command was killed after 20 seconds. 
   
   Note: originally I suggested to put the `Timeout` to the `commonlib.robot` 
to avoid code duplication, but I tested it and doesn't work.
   
   

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to