Add a keyword to WaitForFailure Resource 11/50311/2
authorVratko Polak <vrpolak@cisco.com>
Wed, 11 Jan 2017 17:31:06 +0000 (18:31 +0100)
committerVratko Polak <vrpolak@cisco.com>
Wed, 11 Jan 2017 17:31:06 +0000 (18:31 +0100)
+ Verify_Keyword_Never_Passes_Within_Timeout
+ Documentation updated.

Change-Id: Ie5fc5b45ca082216280f7b8e59d1d3edbd578781
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
csit/libraries/WaitForFailure.robot

index e16014d0af58b1d1e17bfd808d0fb69799c91369..3a0e16b01f3ec04b9db3990f000fcb4213264865 100644 (file)
@@ -1,7 +1,7 @@
 *** Settings ***
 Documentation     Robot keyword Resource for catching a later failure in temporarily passing repeated check.
 ...
-...               Copyright (c) 2015-2016 Cisco Systems, Inc. and others. All rights reserved.
+...               Copyright (c) 2015-2017 Cisco Systems, Inc. and others. All rights reserved.
 ...
 ...               This program and the accompanying materials are made available under the
 ...               terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -51,8 +51,15 @@ Confirm_Keyword_Fails_Within_Timeout
     # Arguments with default values interact badly with varargs, so using WUKS argument style.
     BuiltIn.Run_Keyword_And_Return    BuiltIn.Wait_Until_Keyword_Succeeds    ${timeout}    ${refresh}    Invert_Failure    @{cell_list}
 
+Verify_Keyword_Never_Passes_Within_Timeout
+    [Arguments]    ${timeout}    ${refresh}    @{cell_list}
+    [Documentation]    Some negative checks report false failure for a short time. This keyword verifies no pass does happen within timeout period.
+    BuiltIn.Run_Keyword_And_Return    Invert_Failure    BuiltIn.Wait_Until_Keyword_Succeeds    ${timeout}    ${refresh}    @{cell_list}
+
 Verify_Keyword_Does_Not_Fail_Within_Timeout
     [Arguments]    ${timeout}    ${refresh}    @{cell_list}
-    [Documentation]    Some checks report false success for a short time. This keyword verifies no failure does happen within timeout period.
+    [Documentation]    Some positive checks report false success for a short time. This keyword verifies no failure does happen within timeout period.
+    ...    This implementation needs more complicated logic than, Verify_Keyword_Never_Passes_Within_Timeout,
+    ...    so use that keyword in case you have a negative check handy.
     BuiltIn.Run_Keyword_And_Return    Invert_Failure    Confirm_Keyword_Fails_Within_Timeout    ${timeout}    ${refresh}    @{cell_list}
     # TODO: Remove the added comment text of time running out to restore last Keyword return value.