Improve bug 6917 reproduction 84/46984/2
authorLuis Gomez <ecelgp@gmail.com>
Sat, 15 Oct 2016 19:40:26 +0000 (12:40 -0700)
committerJamo Luhrsen <jluhrsen@redhat.com>
Tue, 18 Oct 2016 16:25:42 +0000 (16:25 +0000)
Bug 6917 can be reproduced by either:

- Adding+deleting same big flow in ~10 sec duration cycle.
- Adding multiple big flows at ~10 sec duration cycle.

Change-Id: I0b4a4796f8f65f0739f7aba9646e0ab04d2d77b2
Signed-off-by: Luis Gomez <ecelgp@gmail.com>
csit/suites/openflowplugin/Bug_Validation/6917.robot

index 444fc321b0fec566b599bd5cf270ea7990e3ef24..cf903ed897ec9ff3c4c653eff00b13d8921cb4a6 100644 (file)
@@ -10,16 +10,23 @@ Variables         ../../../variables/Variables.py
 
 *** Variables ***
 ${XmlsDir}        ${CURDIR}/../../../variables/xmls
-${flowfile}       f21.xml
 ${switch_idx}     1
 ${switch_name}    s${switch_idx}
-${iteration}      5
+${iteration}      4
 
 *** Test Cases ***
-Bug 6917
+Add Delete Same Flow
     [Documentation]    Iterate on add and delete flow until alien ID is found in Operational Datastore.
     : FOR    ${i}    IN RANGE    ${iteration}
-    \    Add And Delete Flow
+    \    Run Keyword And Continue On Failure    Add And Delete Flow    f21.xml
+    [Teardown]    Report_Failure_Due_To_Bug    6917
+
+Add Multiple Flows
+    [Documentation]    Iterate on add and delete flow until alien ID is found in Operational Datastore.
+    Run Keyword And Continue On Failure    Add Flow    f20.xml
+    Run Keyword And Continue On Failure    Add Flow    f21.xml
+    Run Keyword And Continue On Failure    Add Flow    f22.xml
+    Run Keyword And Continue On Failure    Add Flow    f23.xml
     [Teardown]    Report_Failure_Due_To_Bug    6917
 
 *** Keywords ***
@@ -43,13 +50,26 @@ Are Switches Connected Topo
     BuiltIn.Should Be Equal As Numbers    ${count}    1
 
 Add And Delete Flow
+    [Arguments]    ${flowfile}
     [Documentation]    Add a Delete a Flow and verify presence in Datastore. The 5 sec sleep is required to reproduce the bug.
-    Sleep    5
     FlowLib.Create Flow Variables For Suite From XML File    ${XmlsDir}/${flowfile}
     FlowLib.Add Flow Via Restconf    ${switch_idx}    ${table_id}    ${data}
     BuiltIn.Wait Until Keyword Succeeds    10s    1s    FlowLib.Check Operational Flow    ${True}    ${data}
-    FlowLib.Check Datastore Presence    ${flowfile}    ${True}    ${True}    ${False}    ${True}
+    BuiltIn.Wait Until Keyword Succeeds    10s    1s    FlowLib.Check Datastore Presence    ${flowfile}    ${True}    ${True}
+    ...    ${False}    ${True}
     FlowLib.Delete Flow Via Restconf    ${switch_idx}    ${table_id}    ${flow_id}
     BuiltIn.Wait Until Keyword Succeeds    10s    1s    FlowLib.Check Operational Flow    ${False}    ${data}
     FlowLib.Check Datastore Presence    ${flowfile}    ${False}    ${False}    ${True}
+    Sleep    5
     [Teardown]    BuiltIn.Run Keyword And Ignore Error    FlowLib.Delete Flow Via Restconf    ${switch_idx}    ${table_id}    ${flow_id}
+
+Add Flow
+    [Arguments]    ${flowfile}
+    [Documentation]    Add a Delete a Flow and verify presence in Datastore. The 5 sec sleep is required to reproduce the bug.
+    FlowLib.Create Flow Variables For Suite From XML File    ${XmlsDir}/${flowfile}
+    FlowLib.Add Flow Via Restconf    ${switch_idx}    ${table_id}    ${data}
+    BuiltIn.Wait Until Keyword Succeeds    10s    1s    FlowLib.Check Operational Flow    ${True}    ${data}
+    BuiltIn.Wait Until Keyword Succeeds    10s    1s    FlowLib.Check Datastore Presence    ${flowfile}    ${True}    ${True}
+    ...    ${False}    ${True}
+    Sleep    8
+    [Teardown]    BuiltIn.Run Keyword And Ignore Error    RequestsLibrary.Delete Request    session    ${CONFIG_NODES_API}