Do not fail on ODLPARENT-152 92/71092/5
authorJamo Luhrsen <jluhrsen@redhat.com>
Wed, 18 Apr 2018 21:44:13 +0000 (14:44 -0700)
committerJamo Luhrsen <jluhrsen@redhat.com>
Tue, 24 Apr 2018 03:18:02 +0000 (20:18 -0700)
this is a special case exception we want to ignore and
not cause failures in the robot test cases.

The Exception prints a generic 2nd line that was falling
through our normal whitelist process. So this special case
will be caught IFF those two lines appear back to back.

Change-Id: I65b437af3e53a7474fa64ef1b9e42e52e35cf778
Signed-off-by: Jamo Luhrsen <jluhrsen@redhat.com>
csit/libraries/KarafKeywords.robot
csit/variables/netvirt/Exceptions_Whitelist.py

index 21811693309d2004b3cb20828db3f2ca5ea4168f..49e8c3e3c65ba16ad64eda0a34feaf0ea821b9f4 100644 (file)
@@ -257,6 +257,8 @@ Verify Exception Logging In Controller
     ${exceptions}=    Get Karaf Log Type From Test Start    ${controller_ip}    ${test_name}    Exception
     @{log_lines}=    Split String    ${exceptions}    ${\n}
     ${num_log_entries}    Get Length    ${log_lines}
+    # https://jira.opendaylight.org/browse/ODLPARENT-152
+    Run Keyword And Return If    ${num_log_entries} == ${2}    Ignore ODLPARENT-152    @{log_lines}
     Return From Keyword If    ${num_log_entries} == ${0}    No Exceptions found.
     : FOR    ${log_message}    IN    @{log_lines}
     \    Check Against White List    ${log_message}    ${exceptions_white_list}
@@ -273,6 +275,13 @@ Check Against White List
     \    Return From Keyword If    "${exception}" in "${exception_line}"    Exceptions found, but whitelisted: ${\n}${exception_line}${\n}
     Fail    Exceptions Found: ${\n}${exception_line}${\n}
 
+Ignore ODLPARENT-152
+    [Arguments]    @{log_lines}
+    [Documentation]    This will ignore exceptions in @{log_lines} if they match the Exception pattern found in the list
+    ...    variable @{ODLPARENT_152}. Everything else will result in this keyword Failing.
+    Return From Keyword If    "@{ODLPARENT_152}[0]" in "@{log_lines}[0]" and "@{ODLPARENT_152}[1]" in "@{log_lines}[1]"
+    Fail    Exceptions found and not in the whitelist to ignore
+
 Wait_For_Karaf_Log
     [Arguments]    ${message}    ${timeout}=60    ${member_index}=${1}
     [Documentation]    Read karaf logs until message appear
index 35bf3b8fbfa890861770e462e580a547266e3e08..9e09251318684437c8c40556037f979f62eb6c9a 100644 (file)
@@ -5,3 +5,5 @@ NETVIRT_EXCEPTIONS_WHITELIST = [
     'org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry msgType: 1 oxm_field: 33 experimenterID: null was not found - please verify that all needed deserializers ale loaded correctly', # noqa
     'InterruptedByTimeoutException: null'
 ]
+
+ODLPARENT_152 = ['ERROR | Karaf ssh console user karaf | ShellUtil', 'java.lang.NullPointerException: null']