Using WUKS for initial node disco to avoid timing issue
authorJamo Luhrsen <james.luhrsen@hp.com>
Tue, 2 Jun 2015 18:44:25 +0000 (11:44 -0700)
committerJamo Luhrsen <james.luhrsen@hp.com>
Tue, 2 Jun 2015 18:44:25 +0000 (11:44 -0700)
also trimmed other operational checks from 60s to 6s.  for
openflowplugin, the default stats polling time is 3s, so if
it's not there in double that (6s) I think we have a real
problem and can just fail the test case then.

Change-Id: Iad30a6e582e28b5c57837159218013296c394014
Signed-off-by: Jamo Luhrsen <james.luhrsen@hp.com>
test/csit/suites/openflowplugin/Groups_Meters_OF13/005__openflow_group.robot
test/csit/suites/openflowplugin/Groups_Meters_OF13/010__openflow_meter.robot

index 73a519eab0db6e0c5e0c3c4ee4cfbf17ae75e1f3..188c2b8aca13cac97865e84d96dd049da80223e9 100644 (file)
@@ -22,10 +22,8 @@ ${FLOW_NAME}      forward
 *** Test Cases ***
 Get list of nodes
     [Documentation]    Get the inventory to make sure openflow:1 comes up
-    ${resp}    RequestsLibrary.Get    session    ${REST_CONTEXT}
-    Log    ${resp.content}
-    Should Be Equal As Strings    ${resp.status_code}    200
-    Should Contain    ${resp.content}    openflow:1
+    ${node_list}=    Create List    openflow:1
+    Wait Until Keyword Succeeds    3s    1s    Check For Elements At URI    ${REST_CONTEXT_OP}    ${node_list}
 
 Add a group
     [Documentation]    Add a group using RESTCONF
@@ -46,7 +44,7 @@ Verify after adding group config
 Verify after adding group operational
     [Documentation]    Get the group stat in operational
     ${elements}=    Create List    group-statistics    group-desc
-    Wait Until Keyword Succeeds    60s    2s    Check For Elements At URI    ${REST_CONTEXT_OP}/group/1    ${elements}
+    Wait Until Keyword Succeeds    6s    2s    Check For Elements At URI    ${REST_CONTEXT_OP}/group/1    ${elements}
 
 Add a flow that includes a group
     [Documentation]    Push a flow through RESTCONF
@@ -68,7 +66,7 @@ Verify after adding flow config
 Verify after adding flow operational
     [Documentation]    Verify the flow
     ${elements}=    Create List    group-action    group-id
-    Wait Until Keyword Succeeds    60s    2s    Check For Elements At URI    ${REST_CONTEXT_OP}/table/0/flow/1    ${elements}
+    Wait Until Keyword Succeeds    6s    2s    Check For Elements At URI    ${REST_CONTEXT_OP}/table/0/flow/1    ${elements}
 
 Remove the flow
     [Documentation]    Remove the flow
index d78935a882dd6936ee65d18dc27bb8c7d1dce4f1..5d6246e610be6719359bfd0dc1e7fbe80601ebcd 100644 (file)
@@ -22,10 +22,8 @@ ${FLOW_NAME}      forward
 *** Test Cases ***
 Get list of nodes
     [Documentation]    Get the inventory to make sure openflow:1 comes up
-    ${resp}    RequestsLibrary.Get    session    ${REST_CONTEXT}
-    Log    ${resp.content}
-    Should Be Equal As Strings    ${resp.status_code}    200
-    Should Contain    ${resp.content}    openflow:1
+    ${node_list}=    Create List    openflow:1
+    Wait Until Keyword Succeeds    3s    1s    Check For Elements At URI    ${REST_CONTEXT_OP}    ${node_list}
 
 Add a meter
     [Documentation]    Add a meter using RESTCONF
@@ -46,7 +44,7 @@ Verify after adding meter config
 Verify after adding meter operational
     [Documentation]    Get the meter stat in operational
     ${elements}=    Create List    meter-statistics    meter-config-stats
-    Wait Until Keyword Succeeds    60s    2s    Check For Elements At URI    ${REST_CONTEXT_OP}/meter/1    ${elements}
+    Wait Until Keyword Succeeds    6s    2s    Check For Elements At URI    ${REST_CONTEXT_OP}/meter/1    ${elements}
 
 Add a flow that includes a meter
     [Documentation]    Push a flow through RESTCONF
@@ -68,7 +66,7 @@ Verify after adding flow config
 Verify after adding flow operational
     [Documentation]    Verify the flow
     ${elements}=    Create List    meter-id    flow
-    Wait Until Keyword Succeeds    60s    2s    Check For Elements At URI    ${REST_CONTEXT_OP}/table/0/flow/2    ${elements}
+    Wait Until Keyword Succeeds    6s    2s    Check For Elements At URI    ${REST_CONTEXT_OP}/table/0/flow/2    ${elements}
 
 Remove the flow
     [Documentation]    Remove the flow