Revision: 2520
Author: pekka.klarck
Date: Tue Feb 23 05:46:57 2010
Log: Tests for handling test/kw timeouts inside Wait Until Kw Succeeds
http://code.google.com/p/robotframework/source/detail?r=2520

Modified:
/trunk/atest/robot/standard_libraries/builtin/wait_until_keyword_succeeds.txt /trunk/atest/testdata/standard_libraries/builtin/wait_until_keyword_succeeds.txt

=======================================
--- /trunk/atest/robot/standard_libraries/builtin/wait_until_keyword_succeeds.txt Tue Feb 23 05:19:18 2010 +++ /trunk/atest/robot/standard_libraries/builtin/wait_until_keyword_succeeds.txt Tue Feb 23 05:46:57 2010
@@ -1,7 +1,7 @@
 ***Settings***
-Resource     ../../../resources/resource.html
+Resource     ../../../resources/resource.html
 Force Tags  jybot  pybot  regression
-Suite Setup Run Tests ${EMPTY} standard_libraries/builtin/wait_until_keyword_succeeds.html +Suite Setup Run Tests ${EMPTY} standard_libraries/builtin/wait_until_keyword_succeeds.txt

 ***Test Cases***
 Fail Because Timeout exceeded            Check Test Case  ${TEST NAME}
@@ -16,6 +16,10 @@
 Wait Until In User Keyword               Check Test Case  ${TEST NAME}
 Failing User Keyword with Wait Until     Check Test Case  ${TEST NAME}
 Passing User Keyword with Wait Until     Check Test Case  ${TEST NAME}
+Wait Until With Longer Test Timeout      Check Test Case  ${TEST NAME}
+Wait Until With Shorter Test Timeout     Check Test Case  ${TEST NAME}
+Wait Until With Longer Keyword Timeout   Check Test Case  ${TEST NAME}
+Wait Until With Shorter Keyword Timeout  Check Test Case  ${TEST NAME}
 Variable Values Should Not Be Visible As Keyword's Arguments
   ${tc} =  Check Test Case  Pass With First Try
   Check KW Arguments  ${tc.kws[0].kws[0]}  \${HELLO}
=======================================
--- /trunk/atest/testdata/standard_libraries/builtin/wait_until_keyword_succeeds.txt Tue Feb 23 05:28:52 2010 +++ /trunk/atest/testdata/standard_libraries/builtin/wait_until_keyword_succeeds.txt Tue Feb 23 05:46:57 2010
@@ -52,6 +52,26 @@
${return value} = Wait Until Keyword Succeeds 10 minutes 10 milliseconds User Keyword Should Be Equal ${return value} From User Keyword Returned value should be the one defined in user keyword.

+Wait Until With Longer Test Timeout
+    [Timeout]  10 seconds
+ [Documentation] FAIL Timeout 50 milliseconds exceeded. The last error was: My error
+    Wait Until Keyword Succeeds  0.05s  0.01s  Fail  My error
+
+Wait Until With Shorter Test Timeout
+    [Timeout]  0.1 seconds
+    [Documentation]  FAIL  Test timeout 100ms exceeded
+ Wait Until Keyword Succeeds 1minute 0.1s Fail This won't be the final error
+
+Wait Until With Longer Keyword Timeout
+ [Documentation] FAIL Timeout 42 milliseconds exceeded. The last error was: Error in timeouted UK
+    ${timeout} =  Set Variable  1 hour
+    Timeouted UK with Wait Until KW
+
+Wait Until With Shorter Keyword Timeout
+    [Documentation]  FAIL  Keyword timeout 40ms exceeded
+    ${timeout} =  Set Variable  40 milliseconds
+    Timeouted UK with Wait Until KW
+

 ***Keywords***
 User Keyword
@@ -60,3 +80,7 @@

 Wait Until Inside User Keyword
Wait Until Keyword Succeeds 3.99 seconds 0.1 Fail Until Retried Often Enough
+
+Timeouted UK with Wait Until KW
+    [Timeout]  ${timeout}
+    Wait Until Keyword Succeeds  42ms  10ms  Fail  Error in timeouted UK

Reply via email to