Clear known bug ID in SetupUtils.Teardown_Test_Show_Bugs_... 72/35772/2
authorJozef Behran <jbehran@cisco.com>
Fri, 4 Mar 2016 10:46:12 +0000 (11:46 +0100)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 14 Mar 2016 11:04:24 +0000 (11:04 +0000)
When a known bug ID is set to e.g. 1234 and the test steps
after that will catch the bug 1234, the bug ID 1234 is
reported (correctly). But then the rest of the test case is
skipped and the next one is started. This means that the
next test case will have the bug ID set to 1234 and if
it fails, it will also report it found bug 1234 while in
reality it was supposed to report a bug search link instead.
Fix the problem by clearing the bug ID after reporting the
bug.

Change-Id: I44d9c17bd9e22dc4792529dea0425a7f6d06940e
Signed-off-by: Jozef Behran <jbehran@cisco.com>
csit/libraries/SetupUtils.robot

index 60d8c92f5253541ccd05a4935b406a7cc350cc93..9e1152ff37d1bbbf35c64210d1a4a7919da96635 100644 (file)
@@ -38,7 +38,8 @@ Set_Unknown_Bug_Id
     Set_Known_Bug_Id    ${EMPTY}
 
 SetupUtils__Report_Bugs_Causing_Failure
-    BuiltIn.Run_Keyword_And_Return_If    '${SetupUtils__Known_Bug_ID}' != ''    Utils.Report_Failure_Due_To_Bug    ${SetupUtils__Known_Bug_ID}
+    BuiltIn.Run_Keyword_If    '${SetupUtils__Known_Bug_ID}' != ''    Utils.Report_Failure_Due_To_Bug    ${SetupUtils__Known_Bug_ID}
+    BuiltIn.Run_Keyword_And_Return_If    '${SetupUtils__Known_Bug_ID}' != ''    Set_Known_Bug_Id    ${EMPTY}
     Utils.Report_Failure_And_Point_To_Linked_Bugs
 
 Teardown_Test_Show_Bugs_And_Start_Fast_Failing_If_Test_Failed